blob: a009afe4ca26808e4e0548f86b22f0d8858bca5c [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#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://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
270$0: http://bugs.python.org/ about your system, including
271$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'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://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
Kushal Das02d23a22014-04-15 23:50:06 +0530683OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200684PYTHON
685ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200686ac_ct_READELF
687READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000688ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200689ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000690AR
691RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000692USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000693GNULD
694LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000695LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000699PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200706NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200708PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200709MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200710ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000711MAINCC
712CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713GREP
714CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000715OBJEXT
716EXEEXT
717ac_ct_CC
718CPPFLAGS
719LDFLAGS
720CFLAGS
721CC
722EXPORT_MACOSX_DEPLOYMENT_TARGET
723CONFIGURE_MACOSX_DEPLOYMENT_TARGET
724SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200725_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000726MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000727FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800729FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000730FRAMEWORKALTINSTALLLAST
731FRAMEWORKALTINSTALLFIRST
732FRAMEWORKINSTALLLAST
733FRAMEWORKINSTALLFIRST
734PYTHONFRAMEWORKINSTALLDIR
735PYTHONFRAMEWORKPREFIX
736PYTHONFRAMEWORKDIR
737PYTHONFRAMEWORKIDENTIFIER
738PYTHONFRAMEWORK
739LIPO_32BIT_FLAGS
740ARCH_RUN_32BIT
741UNIVERSALSDK
742CONFIG_ARGS
743SOVERSION
744VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200745PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Martin Panter1046d5c2016-04-23 00:58:44 +0000754cross_compiling
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500755HAS_HG
756HGBRANCH
757HGTAG
758HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400759BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000760target_alias
761host_alias
762build_alias
763LIBS
764ECHO_T
765ECHO_N
766ECHO_C
767DEFS
768mandir
769localedir
770libdir
771psdir
772pdfdir
773dvidir
774htmldir
775infodir
776docdir
777oldincludedir
778includedir
779localstatedir
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'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889includedir='${prefix}/include'
890oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
892infodir='${datarootdir}/info'
893htmldir='${docdir}'
894dvidir='${docdir}'
895pdfdir='${docdir}'
896psdir='${docdir}'
897libdir='${exec_prefix}/lib'
898localedir='${datarootdir}/locale'
899mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 # If the previous option needs an argument, assign it.
906 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 ac_prev=
909 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200913 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
914 *=) ac_optarg= ;;
915 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Accept the important Cygnus configure options, so we can diagnose typos.
919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_dashdash$ac_option in
921 --)
922 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924 -bindir | --bindir | --bindi | --bind | --bin | --bi)
925 ac_prev=bindir ;;
926 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 -cache-file | --cache-file | --cache-fil | --cache-fi \
935 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
936 ac_prev=cache_file ;;
937 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
938 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 cache_file=$ac_optarg ;;
940
941 --config-cache | -C)
942 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
950 | --dataroo | --dataro | --datar)
951 ac_prev=datarootdir ;;
952 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
953 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
954 datarootdir=$ac_optarg ;;
955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200960 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt_orig=$ac_useropt
962 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
963 case $ac_user_opts in
964 *"
965"enable_$ac_useropt"
966"*) ;;
967 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
968 ac_unrecognized_sep=', ';;
969 esac
970 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971
972 -docdir | --docdir | --docdi | --doc | --do)
973 ac_prev=docdir ;;
974 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
975 docdir=$ac_optarg ;;
976
977 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
978 ac_prev=dvidir ;;
979 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
980 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000983 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200986 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
999 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1000 | --exec | --exe | --ex)
1001 ac_prev=exec_prefix ;;
1002 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1003 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1004 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
1007 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 # Obsolete; use --with-gas.
1009 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 -help | --help | --hel | --he | -h)
1012 ac_init_help=long ;;
1013 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1014 ac_init_help=recursive ;;
1015 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1016 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1024 ac_prev=htmldir ;;
1025 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1026 | --ht=*)
1027 htmldir=$ac_optarg ;;
1028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -includedir | --includedir | --includedi | --included | --include \
1030 | --includ | --inclu | --incl | --inc)
1031 ac_prev=includedir ;;
1032 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1033 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -infodir | --infodir | --infodi | --infod | --info | --inf)
1037 ac_prev=infodir ;;
1038 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -libdir | --libdir | --libdi | --libd)
1042 ac_prev=libdir ;;
1043 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1047 | --libexe | --libex | --libe)
1048 ac_prev=libexecdir ;;
1049 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1050 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001053 -localedir | --localedir | --localedi | --localed | --locale)
1054 ac_prev=localedir ;;
1055 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1056 localedir=$ac_optarg ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 ac_prev=localstatedir ;;
1061 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1066 ac_prev=mandir ;;
1067 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Obsolete; use --without-fp.
1072 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 no_create=yes ;;
1077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1079 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1080 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1083 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1084 | --oldin | --oldi | --old | --ol | --o)
1085 ac_prev=oldincludedir ;;
1086 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1087 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1088 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1092 ac_prev=prefix ;;
1093 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1097 | --program-pre | --program-pr | --program-p)
1098 ac_prev=program_prefix ;;
1099 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1100 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1104 | --program-suf | --program-su | --program-s)
1105 ac_prev=program_suffix ;;
1106 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1107 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-transform-name | --program-transform-name \
1111 | --program-transform-nam | --program-transform-na \
1112 | --program-transform-n | --program-transform- \
1113 | --program-transform | --program-transfor \
1114 | --program-transfo | --program-transf \
1115 | --program-trans | --program-tran \
1116 | --progr-tra | --program-tr | --program-t)
1117 ac_prev=program_transform_name ;;
1118 -program-transform-name=* | --program-transform-name=* \
1119 | --program-transform-nam=* | --program-transform-na=* \
1120 | --program-transform-n=* | --program-transform-=* \
1121 | --program-transform=* | --program-transfor=* \
1122 | --program-transfo=* | --program-transf=* \
1123 | --program-trans=* | --program-tran=* \
1124 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001127 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1128 ac_prev=pdfdir ;;
1129 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1130 pdfdir=$ac_optarg ;;
1131
1132 -psdir | --psdir | --psdi | --psd | --ps)
1133 ac_prev=psdir ;;
1134 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1135 psdir=$ac_optarg ;;
1136
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1138 | -silent | --silent | --silen | --sile | --sil)
1139 silent=yes ;;
1140
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1142 ac_prev=sbindir ;;
1143 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1144 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
1147 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1148 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1149 | --sharedst | --shareds | --shared | --share | --shar \
1150 | --sha | --sh)
1151 ac_prev=sharedstatedir ;;
1152 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1153 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1154 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1155 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 -site | --site | --sit)
1159 ac_prev=site ;;
1160 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1164 ac_prev=srcdir ;;
1165 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1169 | --syscon | --sysco | --sysc | --sys | --sy)
1170 ac_prev=sysconfdir ;;
1171 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1172 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1181 verbose=yes ;;
1182
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 -version | --version | --versio | --versi | --vers | -V)
1184 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001190 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 ac_useropt_orig=$ac_useropt
1192 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193 case $ac_user_opts in
1194 *"
1195"with_$ac_useropt"
1196"*) ;;
1197 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1198 ac_unrecognized_sep=', ';;
1199 esac
1200 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt_orig=$ac_useropt
1208 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209 case $ac_user_opts in
1210 *"
1211"with_$ac_useropt"
1212"*) ;;
1213 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1214 ac_unrecognized_sep=', ';;
1215 esac
1216 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 --x)
1219 # Obsolete; use --with-x.
1220 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1223 | --x-incl | --x-inc | --x-in | --x-i)
1224 ac_prev=x_includes ;;
1225 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1226 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1230 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1231 ac_prev=x_libraries ;;
1232 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1233 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1237Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 *=*)
1241 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1242 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 case $ac_envvar in #(
1244 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 export $ac_envvar ;;
1249
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001250 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001255 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
1258 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259done
1260
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264fi
1265
Matthias Kloseb9621712010-04-24 17:59:49 +00001266if test -n "$ac_unrecognized_opts"; then
1267 case $enable_option_checking in
1268 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1271 esac
1272fi
1273
1274# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1276 datadir sysconfdir sharedstatedir localstatedir includedir \
1277 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1278 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 # Remove trailing slashes.
1282 case $ac_val in
1283 */ )
1284 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1285 eval $ac_var=\$ac_val;;
1286 esac
1287 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 [\\/$]* | ?:[\\/]* ) continue;;
1290 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001293done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294
Martin v. Löwis11437992002-04-12 09:54:03 +00001295# There might be people who depend on the old broken behavior: `$host'
1296# used to hold the argument of --host etc.
1297# FIXME: To remove some day.
1298build=$build_alias
1299host=$host_alias
1300target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# FIXME: To remove some day.
1303if test "x$host_alias" != x; then
1304 if test "x$build_alias" = x; then
1305 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 elif test "x$build_alias" != "x$host_alias"; then
1307 cross_compiling=yes
1308 fi
1309fi
1310
1311ac_tool_prefix=
1312test -n "$host_alias" && ac_tool_prefix=$host_alias-
1313
1314test "$silent" = yes && exec 6>/dev/null
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317ac_pwd=`pwd` && test -n "$ac_pwd" &&
1318ac_ls_di=`ls -di .` &&
1319ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001320 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001322 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325# Find the source files, if location was not specified.
1326if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 ac_confdir=`$as_dirname -- "$as_myself" ||
1330$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1331 X"$as_myself" : 'X\(//\)[^/]' \| \
1332 X"$as_myself" : 'X\(//\)$' \| \
1333 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1334$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1336 s//\1/
1337 q
1338 }
1339 /^X\(\/\/\)[^/].*/{
1340 s//\1/
1341 q
1342 }
1343 /^X\(\/\/\)$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\).*/{
1348 s//\1/
1349 q
1350 }
1351 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354 srcdir=..
1355 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356else
1357 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359if test ! -r "$srcdir/$ac_unique_file"; then
1360 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001361 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1364ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001365 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 pwd)`
1367# When building in place, set srcdir=.
1368if test "$ac_abs_confdir" = "$ac_pwd"; then
1369 srcdir=.
1370fi
1371# Remove unnecessary trailing slashes from srcdir.
1372# Double slashes in file names in object file debugging info
1373# mess up M-x gdb in Emacs.
1374case $srcdir in
1375*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1376esac
1377for ac_var in $ac_precious_vars; do
1378 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_env_${ac_var}_value=\$${ac_var}
1380 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1381 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1382done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383
Martin v. Löwis11437992002-04-12 09:54:03 +00001384#
1385# Report the --help message.
1386#
1387if test "$ac_init_help" = "long"; then
1388 # Omit some internal or obsolete options to make the list less imposing.
1389 # This message is too long to be a string in the A/UX 3.1 sh.
1390 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001391\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Usage: $0 [OPTION]... [VAR=VALUE]...
1394
1395To assign environment variables (e.g., CC, CFLAGS...), specify them as
1396VAR=VALUE. See below for descriptions of some of the useful variables.
1397
1398Defaults for the options are specified in brackets.
1399
1400Configuration:
1401 -h, --help display this help and exit
1402 --help=short display options specific to this package
1403 --help=recursive display the short help of all the included packages
1404 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001405 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 --cache-file=FILE cache test results in FILE [disabled]
1407 -C, --config-cache alias for \`--cache-file=config.cache'
1408 -n, --no-create do not create output files
1409 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1410
Martin v. Löwis11437992002-04-12 09:54:03 +00001411Installation directories:
1412 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417By default, \`make install' will install all the files in
1418\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1419an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1420for instance \`--prefix=\$HOME'.
1421
1422For better control, use the options below.
1423
1424Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 --bindir=DIR user executables [EPREFIX/bin]
1426 --sbindir=DIR system admin executables [EPREFIX/sbin]
1427 --libexecdir=DIR program executables [EPREFIX/libexec]
1428 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1429 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1430 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1431 --libdir=DIR object code libraries [EPREFIX/lib]
1432 --includedir=DIR C header files [PREFIX/include]
1433 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1434 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1435 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1436 --infodir=DIR info documentation [DATAROOTDIR/info]
1437 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1438 --mandir=DIR man documentation [DATAROOTDIR/man]
1439 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1440 --htmldir=DIR html documentation [DOCDIR]
1441 --dvidir=DIR dvi documentation [DOCDIR]
1442 --pdfdir=DIR pdf documentation [DOCDIR]
1443 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444_ACEOF
1445
1446 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001447
1448System types:
1449 --build=BUILD configure for building on BUILD [guessed]
1450 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
1452fi
1453
1454if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001455 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001456 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001457 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 cat <<\_ACEOF
1459
1460Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001461 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1463 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001464 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001465 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --enable-framework[=INSTALLDIR]
1467 Build (MacOSX|Darwin) framework
1468 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001469 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001470 --enable-loadable-sqlite-extensions
1471 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --enable-ipv6 Enable ipv6 (with ipv4) support
1473 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001474 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001476
1477Optional Packages:
1478 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1479 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001480 --with-universal-archs=ARCH
1481 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001482 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001483 --with-framework-name=FRAMEWORK
1484 specify an alternate name of the framework built
1485 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001487 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001488 --with-cxx-main=<compiler>
1489 compile main() and link python executable with C++
1490 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with-suffix=.exe set executable suffix
1492 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001493 --with-lto Enable Link Time Optimization in PGO builds.
1494 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001495 --with-hash-algorithm=[fnv|siphash24]
1496 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001497 --with-address-sanitizer
1498 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001500 --with-system-expat build pyexpat module using an installed expat
1501 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001502 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001503 --with-system-libmpdec build _decimal module using an installed libmpdec
1504 library
Ned Deilyd819b932013-09-06 01:07:05 -07001505 --with-tcltk-includes='-I...'
1506 override search for Tcl and Tk include files
1507 --with-tcltk-libs='-L...'
1508 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001509 --with-dbmliborder=db1:db2:...
1510 order to check db backends for dbm. Valid value is a
1511 colon separated string with the backend names
1512 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with(out)-threads[=DIRECTORY]
1515 disable/enable thread support
1516 --with(out)-thread[=DIRECTORY]
1517 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001519 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001521 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with-fpectl enable SIGFPE catching
1523 --with-libm=STRING math library
1524 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001525 --with(out)-computed-gotos
1526 Use computed gotos in evaluation loop (enabled by
1527 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001528 --with(out)-ensurepip=[=upgrade]
1529 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001530
1531Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001532 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 CC C compiler command
1534 CFLAGS C compiler flags
1535 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1536 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001538 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001540 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001541 PKG_CONFIG path to pkg-config utility
1542 PKG_CONFIG_PATH
1543 directories to add to pkg-config's search path
1544 PKG_CONFIG_LIBDIR
1545 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547Use these variables to override the choices made by `configure' or to help
1548it to find libraries and programs with nonstandard names/locations.
1549
Georg Brandle2e15612009-05-20 18:25:10 +00001550Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001553fi
1554
1555if test "$ac_init_help" = "recursive"; then
1556 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 test -d "$ac_dir" ||
1559 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1560 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 ac_builddir=.
1562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563case "$ac_dir" in
1564.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1565*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 case $ac_top_builddir_sub in
1570 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1571 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1572 esac ;;
1573esac
1574ac_abs_top_builddir=$ac_pwd
1575ac_abs_builddir=$ac_pwd$ac_dir_suffix
1576# for backward compatibility:
1577ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 ac_top_srcdir=$ac_top_builddir_sub
1583 ac_abs_top_srcdir=$ac_pwd ;;
1584 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 ac_top_srcdir=$srcdir
1587 ac_abs_top_srcdir=$srcdir ;;
1588 *) # Relative name.
1589 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1590 ac_top_srcdir=$ac_top_build_prefix$srcdir
1591 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001592esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 cd "$ac_dir" || { ac_status=$?; continue; }
1596 # Check for guested configure.
1597 if test -f "$ac_srcdir/configure.gnu"; then
1598 echo &&
1599 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1600 elif test -f "$ac_srcdir/configure"; then
1601 echo &&
1602 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001604 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 fi || ac_status=$?
1606 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 done
1608fi
1609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001611if $ac_init_version; then
1612 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001613python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001614generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001615
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001616Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617This configure script is free software; the Free Software Foundation
1618gives unlimited permission to copy, distribute and modify it.
1619_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001622
1623## ------------------------ ##
1624## Autoconf initialization. ##
1625## ------------------------ ##
1626
1627# ac_fn_c_try_compile LINENO
1628# --------------------------
1629# Try to compile conftest.$ac_ext, and return whether this succeeded.
1630ac_fn_c_try_compile ()
1631{
1632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1633 rm -f conftest.$ac_objext
1634 if { { ac_try="$ac_compile"
1635case "(($ac_try" in
1636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1637 *) ac_try_echo=$ac_try;;
1638esac
1639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1640$as_echo "$ac_try_echo"; } >&5
1641 (eval "$ac_compile") 2>conftest.err
1642 ac_status=$?
1643 if test -s conftest.err; then
1644 grep -v '^ *+' conftest.err >conftest.er1
1645 cat conftest.er1 >&5
1646 mv -f conftest.er1 conftest.err
1647 fi
1648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1649 test $ac_status = 0; } && {
1650 test -z "$ac_c_werror_flag" ||
1651 test ! -s conftest.err
1652 } && test -s conftest.$ac_objext; then :
1653 ac_retval=0
1654else
1655 $as_echo "$as_me: failed program was:" >&5
1656sed 's/^/| /' conftest.$ac_ext >&5
1657
1658 ac_retval=1
1659fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001660 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 as_fn_set_status $ac_retval
1662
1663} # ac_fn_c_try_compile
1664
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001665# ac_fn_c_try_cpp LINENO
1666# ----------------------
1667# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1668ac_fn_c_try_cpp ()
1669{
1670 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1671 if { { ac_try="$ac_cpp conftest.$ac_ext"
1672case "(($ac_try" in
1673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674 *) ac_try_echo=$ac_try;;
1675esac
1676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677$as_echo "$ac_try_echo"; } >&5
1678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1679 ac_status=$?
1680 if test -s conftest.err; then
1681 grep -v '^ *+' conftest.err >conftest.er1
1682 cat conftest.er1 >&5
1683 mv -f conftest.er1 conftest.err
1684 fi
1685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1686 test $ac_status = 0; } > conftest.i && {
1687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1688 test ! -s conftest.err
1689 }; then :
1690 ac_retval=0
1691else
1692 $as_echo "$as_me: failed program was:" >&5
1693sed 's/^/| /' conftest.$ac_ext >&5
1694
1695 ac_retval=1
1696fi
1697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1698 as_fn_set_status $ac_retval
1699
1700} # ac_fn_c_try_cpp
1701
Matthias Kloseb9621712010-04-24 17:59:49 +00001702# ac_fn_c_try_link LINENO
1703# -----------------------
1704# Try to link conftest.$ac_ext, and return whether this succeeded.
1705ac_fn_c_try_link ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708 rm -f conftest.$ac_objext conftest$ac_exeext
1709 if { { ac_try="$ac_link"
1710case "(($ac_try" in
1711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712 *) ac_try_echo=$ac_try;;
1713esac
1714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715$as_echo "$ac_try_echo"; } >&5
1716 (eval "$ac_link") 2>conftest.err
1717 ac_status=$?
1718 if test -s conftest.err; then
1719 grep -v '^ *+' conftest.err >conftest.er1
1720 cat conftest.er1 >&5
1721 mv -f conftest.er1 conftest.err
1722 fi
1723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1724 test $ac_status = 0; } && {
1725 test -z "$ac_c_werror_flag" ||
1726 test ! -s conftest.err
1727 } && test -s conftest$ac_exeext && {
1728 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001729 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 }; then :
1731 ac_retval=0
1732else
1733 $as_echo "$as_me: failed program was:" >&5
1734sed 's/^/| /' conftest.$ac_ext >&5
1735
1736 ac_retval=1
1737fi
1738 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1739 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1740 # interfere with the next link command; also delete a directory that is
1741 # left behind by Apple's compiler. We do this before executing the actions.
1742 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 as_fn_set_status $ac_retval
1745
1746} # ac_fn_c_try_link
1747
Matthias Kloseb9621712010-04-24 17:59:49 +00001748# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1749# -------------------------------------------------------
1750# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1751# the include files in INCLUDES and setting the cache variable VAR
1752# accordingly.
1753ac_fn_c_check_header_mongrel ()
1754{
1755 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001756 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1758$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001759if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 $as_echo_n "(cached) " >&6
1761fi
1762eval ac_res=\$$3
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1764$as_echo "$ac_res" >&6; }
1765else
1766 # Is the header compilable?
1767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1768$as_echo_n "checking $2 usability... " >&6; }
1769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1770/* end confdefs.h. */
1771$4
1772#include <$2>
1773_ACEOF
1774if ac_fn_c_try_compile "$LINENO"; then :
1775 ac_header_compiler=yes
1776else
1777 ac_header_compiler=no
1778fi
1779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1781$as_echo "$ac_header_compiler" >&6; }
1782
1783# Is the header present?
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1785$as_echo_n "checking $2 presence... " >&6; }
1786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1787/* end confdefs.h. */
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_cpp "$LINENO"; then :
1791 ac_header_preproc=yes
1792else
1793 ac_header_preproc=no
1794fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001795rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1797$as_echo "$ac_header_preproc" >&6; }
1798
1799# So? What about this header?
1800case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1801 yes:no: )
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1803$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1805$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1806 ;;
1807 no:yes:* )
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1809$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1811$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1813$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1815$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1817$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001818( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001819## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001820## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 ) | sed "s/^/$as_me: WARNING: /" >&2
1822 ;;
1823esac
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1825$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001826if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001827 $as_echo_n "(cached) " >&6
1828else
1829 eval "$3=\$ac_header_compiler"
1830fi
1831eval ac_res=\$$3
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1833$as_echo "$ac_res" >&6; }
1834fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001836
1837} # ac_fn_c_check_header_mongrel
1838
1839# ac_fn_c_try_run LINENO
1840# ----------------------
1841# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1842# that executables *can* be run.
1843ac_fn_c_try_run ()
1844{
1845 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846 if { { ac_try="$ac_link"
1847case "(($ac_try" in
1848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849 *) ac_try_echo=$ac_try;;
1850esac
1851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852$as_echo "$ac_try_echo"; } >&5
1853 (eval "$ac_link") 2>&5
1854 ac_status=$?
1855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1856 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1857 { { case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_try") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; }; }; then :
1867 ac_retval=0
1868else
1869 $as_echo "$as_me: program exited with status $ac_status" >&5
1870 $as_echo "$as_me: failed program was:" >&5
1871sed 's/^/| /' conftest.$ac_ext >&5
1872
1873 ac_retval=$ac_status
1874fi
1875 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 as_fn_set_status $ac_retval
1878
1879} # ac_fn_c_try_run
1880
1881# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1882# -------------------------------------------------------
1883# Tests whether HEADER exists and can be compiled using the include files in
1884# INCLUDES, setting the cache variable VAR accordingly.
1885ac_fn_c_check_header_compile ()
1886{
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1889$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001890if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001891 $as_echo_n "(cached) " >&6
1892else
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$4
1896#include <$2>
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"; then :
1899 eval "$3=yes"
1900else
1901 eval "$3=no"
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1904fi
1905eval ac_res=\$$3
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001909
1910} # ac_fn_c_check_header_compile
1911
Matthias Kloseb9621712010-04-24 17:59:49 +00001912# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1913# -------------------------------------------
1914# Tests whether TYPE exists after having included INCLUDES, setting cache
1915# variable VAR accordingly.
1916ac_fn_c_check_type ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001921if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001922 $as_echo_n "(cached) " >&6
1923else
1924 eval "$3=no"
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928int
1929main ()
1930{
1931if (sizeof ($2))
1932 return 0;
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941int
1942main ()
1943{
1944if (sizeof (($2)))
1945 return 0;
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951
1952else
1953 eval "$3=yes"
1954fi
1955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1956fi
1957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1958fi
1959eval ac_res=\$$3
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1961$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001963
1964} # ac_fn_c_check_type
1965
1966# ac_fn_c_find_uintX_t LINENO BITS VAR
1967# ------------------------------------
1968# Finds an unsigned integer type with width BITS, setting cache variable VAR
1969# accordingly.
1970ac_fn_c_find_uintX_t ()
1971{
1972 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1974$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001975if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001976 $as_echo_n "(cached) " >&6
1977else
1978 eval "$3=no"
1979 # Order is important - never check a type that is potentially smaller
1980 # than half of the expected target width.
1981 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1982 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$ac_includes_default
1986int
1987main ()
1988{
1989static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001990test_array [0] = 0;
1991return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993 ;
1994 return 0;
1995}
1996_ACEOF
1997if ac_fn_c_try_compile "$LINENO"; then :
1998 case $ac_type in #(
1999 uint$2_t) :
2000 eval "$3=yes" ;; #(
2001 *) :
2002 eval "$3=\$ac_type" ;;
2003esac
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002006 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008else
2009 break
2010fi
2011 done
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018} # ac_fn_c_find_uintX_t
2019
2020# ac_fn_c_find_intX_t LINENO BITS VAR
2021# -----------------------------------
2022# Finds a signed integer type with width BITS, setting cache variable VAR
2023# accordingly.
2024ac_fn_c_find_intX_t ()
2025{
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2028$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002029if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002030 $as_echo_n "(cached) " >&6
2031else
2032 eval "$3=no"
2033 # Order is important - never check a type that is potentially smaller
2034 # than half of the expected target width.
2035 for ac_type in int$2_t 'int' 'long int' \
2036 'long long int' 'short int' 'signed char'; do
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002040 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002041int
2042main ()
2043{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002044static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002056 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002057int
2058main ()
2059{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002060static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002061 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070
2071else
2072 case $ac_type in #(
2073 int$2_t) :
2074 eval "$3=yes" ;; #(
2075 *) :
2076 eval "$3=\$ac_type" ;;
2077esac
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002082 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084else
2085 break
2086fi
2087 done
2088fi
2089eval ac_res=\$$3
2090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2091$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002092 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002093
2094} # ac_fn_c_find_intX_t
2095
2096# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2097# --------------------------------------------
2098# Tries to find the compile-time value of EXPR in a program that includes
2099# INCLUDES, setting VAR accordingly. Returns whether the value could be
2100# computed
2101ac_fn_c_compute_int ()
2102{
2103 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104 if test "$cross_compiling" = yes; then
2105 # Depending upon the size, compute the lo and hi bounds.
2106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002113test_array [0] = 0;
2114return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002115
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_lo=0 ac_mid=0
2122 while :; do
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126int
2127main ()
2128{
2129static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002130test_array [0] = 0;
2131return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002132
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_compile "$LINENO"; then :
2138 ac_hi=$ac_mid; break
2139else
2140 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2141 if test $ac_lo -le $ac_mid; then
2142 ac_lo= ac_hi=
2143 break
2144 fi
2145 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148 done
2149else
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153int
2154main ()
2155{
2156static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002157test_array [0] = 0;
2158return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_compile "$LINENO"; then :
2165 ac_hi=-1 ac_mid=-1
2166 while :; do
2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h. */
2169$4
2170int
2171main ()
2172{
2173static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002174test_array [0] = 0;
2175return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002176
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_compile "$LINENO"; then :
2182 ac_lo=$ac_mid; break
2183else
2184 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2185 if test $ac_mid -le $ac_hi; then
2186 ac_lo= ac_hi=
2187 break
2188 fi
2189 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192 done
2193else
2194 ac_lo= ac_hi=
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197fi
2198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199# Binary search between lo and hi bounds.
2200while test "x$ac_lo" != "x$ac_hi"; do
2201 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205int
2206main ()
2207{
2208static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002209test_array [0] = 0;
2210return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_compile "$LINENO"; then :
2217 ac_hi=$ac_mid
2218else
2219 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2220fi
2221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222done
2223case $ac_lo in #((
2224?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2225'') ac_retval=1 ;;
2226esac
2227 else
2228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2229/* end confdefs.h. */
2230$4
2231static long int longval () { return $2; }
2232static unsigned long int ulongval () { return $2; }
2233#include <stdio.h>
2234#include <stdlib.h>
2235int
2236main ()
2237{
2238
2239 FILE *f = fopen ("conftest.val", "w");
2240 if (! f)
2241 return 1;
2242 if (($2) < 0)
2243 {
2244 long int i = longval ();
2245 if (i != ($2))
2246 return 1;
2247 fprintf (f, "%ld", i);
2248 }
2249 else
2250 {
2251 unsigned long int i = ulongval ();
2252 if (i != ($2))
2253 return 1;
2254 fprintf (f, "%lu", i);
2255 }
2256 /* Do not output a trailing newline, as this causes \r\n confusion
2257 on some platforms. */
2258 return ferror (f) || fclose (f) != 0;
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_run "$LINENO"; then :
2265 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2266else
2267 ac_retval=1
2268fi
2269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2270 conftest.$ac_objext conftest.beam conftest.$ac_ext
2271rm -f conftest.val
2272
2273 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002275 as_fn_set_status $ac_retval
2276
2277} # ac_fn_c_compute_int
2278
2279# ac_fn_c_check_func LINENO FUNC VAR
2280# ----------------------------------
2281# Tests whether FUNC exists, setting the cache variable VAR accordingly
2282ac_fn_c_check_func ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2286$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2293 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2294#define $2 innocuous_$2
2295
2296/* System header to define __stub macros and hopefully few prototypes,
2297 which can conflict with char $2 (); below.
2298 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2299 <limits.h> exists even on freestanding compilers. */
2300
2301#ifdef __STDC__
2302# include <limits.h>
2303#else
2304# include <assert.h>
2305#endif
2306
2307#undef $2
2308
2309/* Override any GCC internal prototype to avoid an error.
2310 Use char because int might match the return type of a GCC
2311 builtin and then its argument prototype would still apply. */
2312#ifdef __cplusplus
2313extern "C"
2314#endif
2315char $2 ();
2316/* The GNU C library defines this for functions which it implements
2317 to always fail with ENOSYS. Some functions are actually named
2318 something starting with __ and the normal name is an alias. */
2319#if defined __stub_$2 || defined __stub___$2
2320choke me
2321#endif
2322
2323int
2324main ()
2325{
2326return $2 ();
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_link "$LINENO"; then :
2332 eval "$3=yes"
2333else
2334 eval "$3=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext \
2337 conftest$ac_exeext conftest.$ac_ext
2338fi
2339eval ac_res=\$$3
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2341$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002342 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002343
2344} # ac_fn_c_check_func
2345
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002346# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2347# ---------------------------------------------
2348# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2349# accordingly.
2350ac_fn_c_check_decl ()
2351{
2352 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353 as_decl_name=`echo $2|sed 's/ *(.*//'`
2354 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2356$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2357if eval \${$3+:} false; then :
2358 $as_echo_n "(cached) " >&6
2359else
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h. */
2362$4
2363int
2364main ()
2365{
2366#ifndef $as_decl_name
2367#ifdef __cplusplus
2368 (void) $as_decl_use;
2369#else
2370 (void) $as_decl_name;
2371#endif
2372#endif
2373
2374 ;
2375 return 0;
2376}
2377_ACEOF
2378if ac_fn_c_try_compile "$LINENO"; then :
2379 eval "$3=yes"
2380else
2381 eval "$3=no"
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384fi
2385eval ac_res=\$$3
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2387$as_echo "$ac_res" >&6; }
2388 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2389
2390} # ac_fn_c_check_decl
2391
Matthias Kloseb9621712010-04-24 17:59:49 +00002392# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2393# ----------------------------------------------------
2394# Tries to find if the field MEMBER exists in type AGGR, after including
2395# INCLUDES, setting cache variable VAR accordingly.
2396ac_fn_c_check_member ()
2397{
2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2400$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002401if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002402 $as_echo_n "(cached) " >&6
2403else
2404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405/* end confdefs.h. */
2406$5
2407int
2408main ()
2409{
2410static $2 ac_aggr;
2411if (ac_aggr.$3)
2412return 0;
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417if ac_fn_c_try_compile "$LINENO"; then :
2418 eval "$4=yes"
2419else
2420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h. */
2422$5
2423int
2424main ()
2425{
2426static $2 ac_aggr;
2427if (sizeof ac_aggr.$3)
2428return 0;
2429 ;
2430 return 0;
2431}
2432_ACEOF
2433if ac_fn_c_try_compile "$LINENO"; then :
2434 eval "$4=yes"
2435else
2436 eval "$4=no"
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2441fi
2442eval ac_res=\$$4
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2444$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002445 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002446
2447} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002449This file contains any messages produced by compilers while
2450running configure, to aid debugging if configure makes a mistake.
2451
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002452It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002453generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455 $ $0 $@
2456
2457_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002459{
2460cat <<_ASUNAME
2461## --------- ##
2462## Platform. ##
2463## --------- ##
2464
2465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2466uname -m = `(uname -m) 2>/dev/null || echo unknown`
2467uname -r = `(uname -r) 2>/dev/null || echo unknown`
2468uname -s = `(uname -s) 2>/dev/null || echo unknown`
2469uname -v = `(uname -v) 2>/dev/null || echo unknown`
2470
2471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2473
2474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2481
2482_ASUNAME
2483
2484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2485for as_dir in $PATH
2486do
2487 IFS=$as_save_IFS
2488 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 $as_echo "PATH: $as_dir"
2490 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002492
2493} >&5
2494
2495cat >&5 <<_ACEOF
2496
2497
2498## ----------- ##
2499## Core tests. ##
2500## ----------- ##
2501
2502_ACEOF
2503
2504
2505# Keep a trace of the command line.
2506# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002507# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002508# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002509# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002510ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002511ac_configure_args0=
2512ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002513ac_must_keep_next=false
2514for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002515do
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 for ac_arg
2517 do
2518 case $ac_arg in
2519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2521 | -silent | --silent | --silen | --sile | --sil)
2522 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 esac
2526 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002531 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002533 case $ac_arg in
2534 *=* | --config-cache | -C | -disable-* | --disable-* \
2535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2537 | -with-* | --with-* | -without-* | --without-* | --x)
2538 case "$ac_configure_args0 " in
2539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2540 esac
2541 ;;
2542 -* ) ac_must_keep_next=true ;;
2543 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 ;;
2547 esac
2548 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
Matthias Kloseb9621712010-04-24 17:59:49 +00002550{ ac_configure_args0=; unset ac_configure_args0;}
2551{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
2553# When interrupted or exit'd, cleanup temporary files, and complete
2554# config.log. We remove comments because anyway the quotes in there
2555# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556# WARNING: Use '\'' to represent an apostrophe within the trap.
2557# 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 +00002558trap 'exit_status=$?
2559 # Save into config.log some information that might help in debugging.
2560 {
2561 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002562
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002564## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo
2567 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568(
2569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2570 eval ac_val=\$$ac_var
2571 case $ac_val in #(
2572 *${as_nl}*)
2573 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2575$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 esac
2577 case $ac_var in #(
2578 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2580 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 esac ;;
2582 esac
2583 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2586 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 "s/'\''/'\''\\\\'\'''\''/g;
2589 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2590 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002591 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002593 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac |
2595 sort
2596)
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002598
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002600## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002602 echo
2603 for ac_var in $ac_subst_vars
2604 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 eval ac_val=\$$ac_var
2606 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 done | sort
2611 echo
2612
2613 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002616## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002617 echo
2618 for ac_var in $ac_subst_files
2619 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 eval ac_val=\$$ac_var
2621 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002625 done | sort
2626 echo
2627 fi
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002630 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002631## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002632## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 echo
2636 fi
2637 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 $as_echo "$as_me: caught signal $ac_signal"
2639 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641 rm -f core *.core core.conftest.* &&
2642 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002645for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002647done
2648ac_signal=0
2649
2650# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002651rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002652
Matthias Kloseb9621712010-04-24 17:59:49 +00002653$as_echo "/* confdefs.h */" > confdefs.h
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655# Predefined preprocessor variables.
2656
2657cat >>confdefs.h <<_ACEOF
2658#define PACKAGE_NAME "$PACKAGE_NAME"
2659_ACEOF
2660
Martin v. Löwis11437992002-04-12 09:54:03 +00002661cat >>confdefs.h <<_ACEOF
2662#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2663_ACEOF
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_VERSION "$PACKAGE_VERSION"
2667_ACEOF
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_STRING "$PACKAGE_STRING"
2671_ACEOF
2672
Martin v. Löwis11437992002-04-12 09:54:03 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2675_ACEOF
2676
Matthias Kloseb9621712010-04-24 17:59:49 +00002677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_URL "$PACKAGE_URL"
2679_ACEOF
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
2682# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002683# Prefer an explicitly selected file to automatically selected ones.
2684ac_site_file1=NONE
2685ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002687 # We do not want a PATH search for config.site.
2688 case $CONFIG_SITE in #((
2689 -*) ac_site_file1=./$CONFIG_SITE;;
2690 */*) ac_site_file1=$CONFIG_SITE;;
2691 *) ac_site_file1=./$CONFIG_SITE;;
2692 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 ac_site_file1=$prefix/share/config.site
2695 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696else
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 ac_site_file1=$ac_default_prefix/share/config.site
2698 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002700for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701do
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 test "x$ac_site_file" = xNONE && continue
2703 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2705$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002707 . "$ac_site_file" \
2708 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2710as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002711See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712 fi
2713done
2714
2715if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 # Some versions of bash will fail to source /dev/null (special files
2717 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2718 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2720$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2723 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 esac
2725 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726else
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2728$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 >$cache_file
2730fi
2731
2732# Check that the precious variables saved in the cache have kept the same
2733# value.
2734ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2737 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2739 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 case $ac_old_set,$ac_new_set in
2741 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2743$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 +00002744 ac_cache_corrupted=: ;;
2745 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002746 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2747$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 ac_cache_corrupted=: ;;
2749 ,);;
2750 *)
2751 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002752 # differences in whitespace do not lead to failure.
2753 ac_old_val_w=`echo x $ac_old_val`
2754 ac_new_val_w=`echo x $ac_new_val`
2755 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2757$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2758 ac_cache_corrupted=:
2759 else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2761$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2762 eval $ac_var=\$ac_old_val
2763 fi
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2765$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2767$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 fi;;
2769 esac
2770 # Pass precious variables to config.status.
2771 if test "$ac_new_set" = set; then
2772 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002773 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 *) ac_arg=$ac_var=$ac_new_val ;;
2775 esac
2776 case " $ac_configure_args " in
2777 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002778 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 esac
2780 fi
2781done
2782if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2786$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002787 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002789## -------------------- ##
2790## Main body of script. ##
2791## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002792
Guido van Rossum7f43da71994-08-01 12:15:30 +00002793ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2797ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002798
Guido van Rossum627b2d71993-12-24 10:39:16 +00002799
Michael W. Hudson54241132001-12-07 15:38:26 +00002800
Trent Nelson4d4ec652012-10-16 08:51:24 -04002801
Trent Nelson5595ab52012-10-17 04:47:31 -04002802if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002803 # If we're building out-of-tree, we need to make sure the following
2804 # resources get picked up before their $srcdir counterparts.
2805 # Objects/ -> typeslots.inc
2806 # Include/ -> Python-ast.h, graminit.h
2807 # Python/ -> importlib.h
2808 # (A side effect of this is that these resources will automatically be
2809 # regenerated when building out-of-tree, regardless of whether or not
2810 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2811 # off.)
2812 BASECPPFLAGS="-IObjects -IInclude -IPython"
2813else
2814 BASECPPFLAGS=""
2815fi
2816
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002817
2818
2819
2820
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002821if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002822then
2823# Extract the first word of "hg", so it can be a program name with args.
2824set dummy hg; ac_word=$2
2825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2826$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002827if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002828 $as_echo_n "(cached) " >&6
2829else
2830 if test -n "$HAS_HG"; then
2831 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2832else
2833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2834for as_dir in $PATH
2835do
2836 IFS=$as_save_IFS
2837 test -z "$as_dir" && as_dir=.
2838 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002840 ac_cv_prog_HAS_HG="found"
2841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2842 break 2
2843 fi
2844done
2845 done
2846IFS=$as_save_IFS
2847
2848 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2849fi
2850fi
2851HAS_HG=$ac_cv_prog_HAS_HG
2852if test -n "$HAS_HG"; then
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2854$as_echo "$HAS_HG" >&6; }
2855else
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2857$as_echo "no" >&6; }
2858fi
2859
2860
2861else
2862HAS_HG=no-repository
2863fi
2864if test $HAS_HG = found
2865then
2866 HGVERSION="hg id -i \$(srcdir)"
2867 HGTAG="hg id -t \$(srcdir)"
2868 HGBRANCH="hg id -b \$(srcdir)"
2869else
2870 HGVERSION=""
2871 HGTAG=""
2872 HGBRANCH=""
2873fi
2874
2875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002876ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
2878
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002879ac_aux_dir=
2880for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2881 if test -f "$ac_dir/install-sh"; then
2882 ac_aux_dir=$ac_dir
2883 ac_install_sh="$ac_aux_dir/install-sh -c"
2884 break
2885 elif test -f "$ac_dir/install.sh"; then
2886 ac_aux_dir=$ac_dir
2887 ac_install_sh="$ac_aux_dir/install.sh -c"
2888 break
2889 elif test -f "$ac_dir/shtool"; then
2890 ac_aux_dir=$ac_dir
2891 ac_install_sh="$ac_aux_dir/shtool install -c"
2892 break
2893 fi
2894done
2895if test -z "$ac_aux_dir"; then
2896 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2897fi
2898
2899# These three variables are undocumented and unsupported,
2900# and are intended to be withdrawn in a future Autoconf release.
2901# They can cause serious problems if a builder's source tree is in a directory
2902# whose full name contains unusual characters.
2903ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2904ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2905ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2906
2907
2908# Make sure we can run config.sub.
2909$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2910 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2911
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2913$as_echo_n "checking build system type... " >&6; }
2914if ${ac_cv_build+:} false; then :
2915 $as_echo_n "(cached) " >&6
2916else
2917 ac_build_alias=$build_alias
2918test "x$ac_build_alias" = x &&
2919 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2920test "x$ac_build_alias" = x &&
2921 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2922ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2923 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2924
2925fi
2926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2927$as_echo "$ac_cv_build" >&6; }
2928case $ac_cv_build in
2929*-*-*) ;;
2930*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2931esac
2932build=$ac_cv_build
2933ac_save_IFS=$IFS; IFS='-'
2934set x $ac_cv_build
2935shift
2936build_cpu=$1
2937build_vendor=$2
2938shift; shift
2939# Remember, the first character of IFS is used to create $*,
2940# except with old shells:
2941build_os=$*
2942IFS=$ac_save_IFS
2943case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2944
2945
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2947$as_echo_n "checking host system type... " >&6; }
2948if ${ac_cv_host+:} false; then :
2949 $as_echo_n "(cached) " >&6
2950else
2951 if test "x$host_alias" = x; then
2952 ac_cv_host=$ac_cv_build
2953else
2954 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2955 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2956fi
2957
2958fi
2959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2960$as_echo "$ac_cv_host" >&6; }
2961case $ac_cv_host in
2962*-*-*) ;;
2963*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2964esac
2965host=$ac_cv_host
2966ac_save_IFS=$IFS; IFS='-'
2967set x $ac_cv_host
2968shift
2969host_cpu=$1
2970host_vendor=$2
2971shift; shift
2972# Remember, the first character of IFS is used to create $*,
2973# except with old shells:
2974host_os=$*
2975IFS=$ac_save_IFS
2976case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2977
2978
2979
doko@python.orga10e4a92013-01-25 18:45:12 +01002980
2981
Ned Deilyfcbc2462014-08-22 13:32:49 -07002982# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2983rm -f pybuilddir.txt
2984
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002985if test "$cross_compiling" = yes; then
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2987$as_echo_n "checking for python interpreter for cross build... " >&6; }
2988 if test -z "$PYTHON_FOR_BUILD"; then
2989 for interp in python$PACKAGE_VERSION python3 python; do
2990 which $interp >/dev/null 2>&1 || continue
2991 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2992 break
2993 fi
2994 interp=
2995 done
2996 if test x$interp = x; then
2997 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2998 fi
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3000$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003001 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 +02003002 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003003elif test "$cross_compiling" = maybe; then
3004 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003005else
3006 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3007fi
3008
3009
Martin v. Löwis11437992002-04-12 09:54:03 +00003010
Benjamin Petersond23f8222009-04-05 19:13:16 +00003011if test "$prefix" != "/"; then
3012 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3013fi
3014
3015
Martin v. Löwis11437992002-04-12 09:54:03 +00003016
3017
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003018# We don't use PACKAGE_ variables, and they cause conflicts
3019# with other autoconf-based packages that include Python.h
3020grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3021rm confdefs.h
3022mv confdefs.h.new confdefs.h
3023
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003024
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003025VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003026
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003027# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003028
3029SOVERSION=1.0
3030
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003031# The later defininition of _XOPEN_SOURCE disables certain features
3032# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003035
3036
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003037# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3038# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3039# them.
3040
Matthias Kloseb9621712010-04-24 17:59:49 +00003041$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003042
3043
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3046# them.
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003049
3050
Martin v. Löwisd6320502004-08-12 13:45:08 +00003051# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3052# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3053
Matthias Kloseb9621712010-04-24 17:59:49 +00003054$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003055
3056
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003057# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3058# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3059# them.
3060
Matthias Kloseb9621712010-04-24 17:59:49 +00003061$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003062
3063
3064
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003065define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003066
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003067# Arguments passed to configure.
3068
3069CONFIG_ARGS="$ac_configure_args"
3070
Matthias Kloseb9621712010-04-24 17:59:49 +00003071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3072$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003074if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003075 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 case $enableval in
3077 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003078 # Locate the best usable SDK, see Mac/README.txt for more
3079 # information
3080 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003081 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003082 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003083 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3084 if test ! -d "${enableval}"
3085 then
3086 enableval=/
3087 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089 ;;
3090 esac
3091 case $enableval in
3092 no)
3093 UNIVERSALSDK=
3094 enable_universalsdk=
3095 ;;
3096 *)
3097 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003098 if test ! -d "${UNIVERSALSDK}"
3099 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003100 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003101 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003102 ;;
3103 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003104
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003105
Thomas Wouters477c8d52006-05-27 19:21:47 +00003106else
3107
3108 UNIVERSALSDK=
3109 enable_universalsdk=
3110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003113if test -n "${UNIVERSALSDK}"
3114then
Matthias Kloseb9621712010-04-24 17:59:49 +00003115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3116$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003117else
Matthias Kloseb9621712010-04-24 17:59:49 +00003118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3119$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003120fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003123
Ned Deily87adb6e2013-10-18 21:09:56 -07003124ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003125
Ned Deilycbfb9a52012-06-23 16:02:19 -07003126# For backward compatibility reasons we prefer to select '32-bit' if available,
3127# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003129if test "`uname -s`" = "Darwin"
3130then
3131 if test -n "${UNIVERSALSDK}"
3132 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003133 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003134 then
3135 UNIVERSAL_ARCHS="intel"
3136 fi
3137 fi
3138fi
3139
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003140
Matthias Kloseb9621712010-04-24 17:59:49 +00003141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3142$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003143
3144# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003145if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003147 UNIVERSAL_ARCHS="$withval"
3148
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003149fi
3150
Ned Deily87adb6e2013-10-18 21:09:56 -07003151if test -n "${UNIVERSALSDK}"
3152then
3153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3154$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3155else
3156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3157$as_echo "no" >&6; }
3158fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003159
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003160
3161# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003162if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003163 withval=$with_framework_name;
3164 PYTHONFRAMEWORK=${withval}
3165 PYTHONFRAMEWORKDIR=${withval}.framework
3166 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3167
3168else
3169
3170 PYTHONFRAMEWORK=Python
3171 PYTHONFRAMEWORKDIR=Python.framework
3172 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3173
3174fi
3175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003177if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003179 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003180 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003181 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003182 esac
3183 case $enableval in
3184 no)
3185 PYTHONFRAMEWORK=
3186 PYTHONFRAMEWORKDIR=no-framework
3187 PYTHONFRAMEWORKPREFIX=
3188 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 FRAMEWORKINSTALLFIRST=
3190 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003191 FRAMEWORKALTINSTALLFIRST=
3192 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003193 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003194 if test "x${prefix}" = "xNONE"; then
3195 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3196 else
3197 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3198 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003199 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003200 ;;
3201 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003202 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003205 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003206 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3207 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003208 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003209 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003210
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211 if test "x${prefix}" = "xNONE" ; then
3212 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003213
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003214 else
3215 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3216 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003217
3218 case "${enableval}" in
3219 /System*)
3220 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3221 if test "${prefix}" = "NONE" ; then
3222 # See below
3223 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3224 fi
3225 ;;
3226
3227 /Library*)
3228 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3229 ;;
3230
3231 */Library/Frameworks)
3232 MDIR="`dirname "${enableval}"`"
3233 MDIR="`dirname "${MDIR}"`"
3234 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3235
3236 if test "${prefix}" = "NONE"; then
3237 # User hasn't specified the
3238 # --prefix option, but wants to install
3239 # the framework in a non-default location,
3240 # ensure that the compatibility links get
3241 # installed relative to that prefix as well
3242 # instead of in /usr/local.
3243 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3244 fi
3245 ;;
3246
3247 *)
3248 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3249 ;;
3250 esac
3251
Jack Jansen127e56e2001-09-11 14:41:54 +00003252 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003253
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003254 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003255 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003259
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003260 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3261
3262 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3263
Jack Jansene578a632001-08-15 01:27:14 +00003264 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003265
Guido van Rossum563e7081996-09-10 18:20:48 +00003266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267
Jack Jansene578a632001-08-15 01:27:14 +00003268 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003269 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003270 PYTHONFRAMEWORKPREFIX=
3271 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003272 FRAMEWORKINSTALLFIRST=
3273 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003274 FRAMEWORKALTINSTALLFIRST=
3275 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003276 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003277 if test "x${prefix}" = "xNONE" ; then
3278 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3279 else
3280 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3281 fi
Jack Jansene578a632001-08-15 01:27:14 +00003282 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285fi
3286
Thomas Wouters477c8d52006-05-27 19:21:47 +00003287
3288
Michael W. Hudson54241132001-12-07 15:38:26 +00003289
3290
3291
3292
Jack Jansene578a632001-08-15 01:27:14 +00003293
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003294
3295
3296
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003297
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003298
Ned Deilyb8f944f2013-11-21 22:42:25 -08003299
Jack Jansene578a632001-08-15 01:27:14 +00003300##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003301## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003302## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003303##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003304# Set name for machine-dependent library files
3305
Matthias Kloseb9621712010-04-24 17:59:49 +00003306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3307$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003308if test -z "$MACHDEP"
3309then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003310 # avoid using uname for cross builds
3311 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003312 # ac_sys_system and ac_sys_release are used for setting
3313 # a lot of different things including 'define_xopen_source'
3314 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003315 case "$host" in
3316 *-*-linux*)
3317 ac_sys_system=Linux
3318 ;;
3319 *-*-cygwin*)
3320 ac_sys_system=Cygwin
3321 ;;
3322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3326 esac
3327 ac_sys_release=
3328 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003329 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003330 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003331 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003332 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003333 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003334 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003335 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003336 fi
3337 ac_md_system=`echo $ac_sys_system |
3338 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3339 ac_md_release=`echo $ac_sys_release |
3340 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3341 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003342
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003343 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003344 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003345 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003346 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003347 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003348 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003349 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003350fi
Guido van Rossum91922671997-10-09 20:24:13 +00003351
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003352
3353if test "$cross_compiling" = yes; then
3354 case "$host" in
3355 *-*-linux*)
3356 case "$host_cpu" in
3357 arm*)
3358 _host_cpu=arm
3359 ;;
3360 *)
3361 _host_cpu=$host_cpu
3362 esac
3363 ;;
3364 *-*-cygwin*)
3365 _host_cpu=
3366 ;;
3367 *)
3368 # for now, limit cross builds to known configurations
3369 MACHDEP="unknown"
3370 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3371 esac
3372 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3373fi
3374
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003375# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3376# disable features if it is defined, without any means to access these
3377# features as extensions. For these systems, we skip the definition of
3378# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3379# some feature, make sure there is no alternative way to access this
3380# feature. Also, when using wildcards, make sure you have verified the
3381# need for not defining _XOPEN_SOURCE on all systems matching the
3382# wildcard, and that the wildcard does not include future systems
3383# (which may remove their limitations).
3384case $ac_sys_system/$ac_sys_release in
3385 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3386 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003387 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003388 # In addition, Stefan Krah confirms that issue #1244610 exists through
3389 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003390 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003391 define_xopen_source=no
3392 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3393 # also defined. This can be overridden by defining _BSD_SOURCE
3394 # As this has a different meaning on Linux, only define it on OpenBSD
3395
Matthias Kloseb9621712010-04-24 17:59:49 +00003396$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003397
3398 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003399 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003400 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3401 # also defined. This can be overridden by defining _BSD_SOURCE
3402 # As this has a different meaning on Linux, only define it on OpenBSD
3403
Matthias Kloseb9621712010-04-24 17:59:49 +00003404$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003405
3406 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003407 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3408 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3409 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003410 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 +00003411 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003412 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3413 # request to enable features supported by the standard as a request
3414 # to disable features not supported by the standard. The best way
3415 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3416 # entirely and define __EXTENSIONS__ instead.
3417 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003418 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003419 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3420 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003421 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003422 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003423 define_xopen_source=no;;
3424 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003425 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003426 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003427 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003428 # On FreeBSD 4, the math functions C89 does not cover are never defined
3429 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3430 FreeBSD/4.*)
3431 define_xopen_source=no;;
3432 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3433 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3434 # identifies itself as Darwin/7.*
3435 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3436 # disables platform specific features beyond repair.
3437 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3438 # has no effect, don't bother defining them
3439 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003440 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003441 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003442 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003443 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3444 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3445 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003446 AIX/4)
3447 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003448 AIX/5)
3449 if test `uname -r` -eq 1; then
3450 define_xopen_source=no
3451 fi
3452 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003453 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3454 # defining NI_NUMERICHOST.
3455 QNX/6.3.2)
3456 define_xopen_source=no
3457 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003458
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003459esac
3460
3461if test $define_xopen_source = yes
3462then
Victor Stinner14d098d2011-09-07 22:29:43 +02003463 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003464
Victor Stinner14d098d2011-09-07 22:29:43 +02003465$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003466
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003467
3468 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3469 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3470 # several APIs are not declared. Since this is also needed in some
3471 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003472
Matthias Kloseb9621712010-04-24 17:59:49 +00003473$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003474
3475
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003476
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003477$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003478
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003479fi
3480
Christian Heimes647cd872013-12-07 23:39:33 +01003481# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3482case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003483 hp*|HP*)
3484 define_stdc_a1=yes;;
3485 *)
3486 define_stdc_a1=no;;
3487esac
3488
3489if test $define_stdc_a1 = yes
3490then
Christian Heimes647cd872013-12-07 23:39:33 +01003491
3492$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3493
Christian Heimesb02bcae2013-12-08 15:21:08 +01003494fi
Christian Heimes647cd872013-12-07 23:39:33 +01003495
Guido van Rossum91922671997-10-09 20:24:13 +00003496#
3497# SGI compilers allow the specification of the both the ABI and the
3498# ISA on the command line. Depending on the values of these switches,
3499# different and often incompatable code will be generated.
3500#
3501# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3502# thus supply support for various ABI/ISA combinations. The MACHDEP
3503# variable is also adjusted.
3504#
3505
3506if test ! -z "$SGI_ABI"
3507then
3508 CC="cc $SGI_ABI"
3509 LDFLAGS="$SGI_ABI $LDFLAGS"
3510 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3513$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003514
Jack Jansen6b08a402004-06-03 12:41:45 +00003515# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3516# it may influence the way we can build extensions, so distutils
3517# needs to check it
3518
Thomas Wouters477c8d52006-05-27 19:21:47 +00003519
Jack Jansen6b08a402004-06-03 12:41:45 +00003520CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003521EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003522
Guido van Rossum627b2d71993-12-24 10:39:16 +00003523# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003524
3525# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3526# for debug/optimization stuff. BASECFLAGS is for flags that are required
3527# just to get things to compile and link. Users are free to override OPT
3528# when running configure or make. The build should not break if they do.
3529# BASECFLAGS should generally not be messed with, however.
3530
3531# XXX shouldn't some/most/all of this code be merged with the stuff later
3532# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3534$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003537if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003539 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003540 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003541 without_gcc=yes;;
3542 yes) CC=gcc
3543 without_gcc=no;;
3544 *) CC=$withval
3545 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003546 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003549 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003550 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003551 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003552 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003553 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554fi
3555
Matthias Kloseb9621712010-04-24 17:59:49 +00003556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3557$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003558
Zachary Ware5af85642015-12-21 12:09:17 -06003559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3560$as_echo_n "checking for --with-icc... " >&6; }
3561
3562# Check whether --with-icc was given.
3563if test "${with_icc+set}" = set; then :
3564 withval=$with_icc;
3565 case $withval in
3566 no) CC=${CC:-cc}
3567 with_icc=no;;
3568 yes) CC=icc
3569 CXX=icpc
3570 with_icc=yes;;
3571 *) CC=$withval
3572 with_icc=$withval;;
3573 esac
3574else
3575
3576 with_icc=no
3577fi
3578
3579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3580$as_echo "$with_icc" >&6; }
3581
Guido van Rossum8b131c51995-03-09 14:10:13 +00003582# If the user switches compilers, we can't believe the cache
3583if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3584then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003585 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003586(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003587fi
3588
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003589# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3590# when the compiler supports them, but we don't always want -O2, and
3591# we set -g later.
3592if test -z "$CFLAGS"; then
3593 CFLAGS=
3594fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003595
3596if test "$ac_sys_system" = "Darwin"
3597then
3598 # Compiler selection on MacOSX is more complicated than
3599 # AC_PROG_CC can handle, see Mac/README.txt for more
3600 # information
3601 if test -z "${CC}"
3602 then
3603 found_gcc=
3604 found_clang=
3605 as_save_IFS=$IFS; IFS=:
3606 for as_dir in $PATH
3607 do
3608 IFS=$as_save_IFS
3609 if test -x $as_dir/gcc; then
3610 if test -z "${found_gcc}"; then
3611 found_gcc=$as_dir/gcc
3612 fi
3613 fi
3614 if test -x $as_dir/clang; then
3615 if test -z "${found_clang}"; then
3616 found_clang=$as_dir/clang
3617 fi
3618 fi
3619 done
3620 IFS=$as_save_IFS
3621
3622 if test -n "$found_gcc" -a -n "$found_clang"
3623 then
3624 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3625 then
3626 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3627$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3628 CC="$found_clang"
3629 CXX="$found_clang++"
3630 fi
3631
3632
3633 elif test -z "$found_gcc" -a -n "$found_clang"
3634 then
3635 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3636$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3637 CC="$found_clang"
3638 CXX="$found_clang++"
3639
3640 elif test -z "$found_gcc" -a -z "$found_clang"
3641 then
3642 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3643 if test -n "${found_clang}"
3644 then
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3646$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3647 CC="${found_clang}"
3648 CXX="`/usr/bin/xcrun -find clang++`"
3649
3650 # else: use default behaviour
3651 fi
3652 fi
3653 fi
3654fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003655ac_ext=c
3656ac_cpp='$CPP $CPPFLAGS'
3657ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3658ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3659ac_compiler_gnu=$ac_cv_c_compiler_gnu
3660if test -n "$ac_tool_prefix"; then
3661 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3662set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003665if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003667else
3668 if test -n "$CC"; then
3669 ac_cv_prog_CC="$CC" # Let the user override the test.
3670else
Martin v. Löwis11437992002-04-12 09:54:03 +00003671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672for as_dir in $PATH
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 $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 +00003680 break 2
3681 fi
3682done
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003685
Jack Jansendd19cf82001-12-06 22:36:17 +00003686fi
3687fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003688CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003689if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3691$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003692else
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3694$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003695fi
3696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697
Martin v. Löwis11437992002-04-12 09:54:03 +00003698fi
3699if test -z "$ac_cv_prog_CC"; then
3700 ac_ct_CC=$CC
3701 # Extract the first word of "gcc", so it can be a program name with args.
3702set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3704$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003705if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003707else
3708 if test -n "$ac_ct_CC"; then
3709 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3710else
3711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712for as_dir in $PATH
3713do
3714 IFS=$as_save_IFS
3715 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $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 +00003720 break 2
3721 fi
3722done
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003725
3726fi
3727fi
3728ac_ct_CC=$ac_cv_prog_ac_ct_CC
3729if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3731$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003732else
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3734$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003735fi
3736
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737 if test "x$ac_ct_CC" = x; then
3738 CC=""
3739 else
3740 case $cross_compiling:$ac_tool_warned in
3741yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003742{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3743$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744ac_tool_warned=yes ;;
3745esac
3746 CC=$ac_ct_CC
3747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003748else
3749 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003750fi
3751
Jack Jansendd19cf82001-12-06 22:36:17 +00003752if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753 if test -n "$ac_tool_prefix"; then
3754 # 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 +00003755set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003758if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003760else
3761 if test -n "$CC"; then
3762 ac_cv_prog_CC="$CC" # Let the user override the test.
3763else
Martin v. Löwis11437992002-04-12 09:54:03 +00003764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 break 2
3774 fi
3775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
3779fi
3780fi
3781CC=$ac_cv_prog_CC
3782if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3784$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
3789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003792fi
3793if test -z "$CC"; then
3794 # Extract the first word of "cc", so it can be a program name with args.
3795set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003798if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003800else
3801 if test -n "$CC"; then
3802 ac_cv_prog_CC="$CC" # Let the user override the test.
3803else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003804 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3806for as_dir in $PATH
3807do
3808 IFS=$as_save_IFS
3809 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003812 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3813 ac_prog_rejected=yes
3814 continue
3815 fi
3816 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $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 +00003818 break 2
3819 fi
3820done
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003823
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003824if test $ac_prog_rejected = yes; then
3825 # We found a bogon in the path, so make sure we never use it.
3826 set dummy $ac_cv_prog_CC
3827 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003829 # We chose a different compiler from the bogus one.
3830 # However, it has the same basename, so the bogon will be chosen
3831 # first if we set CC to just the basename; use the full file name.
3832 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003833 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003834 fi
3835fi
3836fi
3837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003839if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3841$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003842else
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003845fi
3846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848fi
3849if test -z "$CC"; then
3850 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 do
3853 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3854set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003857if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003858 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003859else
3860 if test -n "$CC"; then
3861 ac_cv_prog_CC="$CC" # Let the user override the test.
3862else
Martin v. Löwis11437992002-04-12 09:54:03 +00003863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3864for as_dir in $PATH
3865do
3866 IFS=$as_save_IFS
3867 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 $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 +00003872 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003874done
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003877
3878fi
3879fi
3880CC=$ac_cv_prog_CC
3881if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3883$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003884else
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3886$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003887fi
3888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889
Martin v. Löwis11437992002-04-12 09:54:03 +00003890 test -n "$CC" && break
3891 done
3892fi
3893if test -z "$CC"; then
3894 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003896do
3897 # Extract the first word of "$ac_prog", so it can be a program name with args.
3898set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3900$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003901if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003902 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003903else
3904 if test -n "$ac_ct_CC"; then
3905 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3906else
3907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3908for as_dir in $PATH
3909do
3910 IFS=$as_save_IFS
3911 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003914 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 $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 +00003916 break 2
3917 fi
3918done
Matthias Kloseb9621712010-04-24 17:59:49 +00003919 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003921
Martin v. Löwis11437992002-04-12 09:54:03 +00003922fi
3923fi
3924ac_ct_CC=$ac_cv_prog_ac_ct_CC
3925if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3927$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003928else
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003931fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 test -n "$ac_ct_CC" && break
3935done
Michael W. Hudson54241132001-12-07 15:38:26 +00003936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937 if test "x$ac_ct_CC" = x; then
3938 CC=""
3939 else
3940 case $cross_compiling:$ac_tool_warned in
3941yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003942{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3943$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944ac_tool_warned=yes ;;
3945esac
3946 CC=$ac_ct_CC
3947 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003948fi
3949
3950fi
3951
3952
Matthias Kloseb9621712010-04-24 17:59:49 +00003953test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003955as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003956See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003957
3958# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003959$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3960set X $ac_compile
3961ac_compiler=$2
3962for ac_option in --version -v -V -qversion; do
3963 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964case "(($ac_try" in
3965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3966 *) ac_try_echo=$ac_try;;
3967esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3969$as_echo "$ac_try_echo"; } >&5
3970 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 if test -s conftest.err; then
3973 sed '10a\
3974... rest of stderr output deleted ...
3975 10q' conftest.err >conftest.er1
3976 cat conftest.er1 >&5
3977 fi
3978 rm -f conftest.er1 conftest.err
3979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3980 test $ac_status = 0; }
3981done
Martin v. Löwis11437992002-04-12 09:54:03 +00003982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003984/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003985
Martin v. Löwis11437992002-04-12 09:54:03 +00003986int
3987main ()
3988{
3989
3990 ;
3991 return 0;
3992}
3993_ACEOF
3994ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003995ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003996# Try to create an executable without -o first, disregard a.out.
3997# It will help us diagnose broken compilers, and finding out an intuition
3998# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4000$as_echo_n "checking whether the C compiler works... " >&6; }
4001ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4002
4003# The possible output files:
4004ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006ac_rmfiles=
4007for ac_file in $ac_files
4008do
4009 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4012 esac
4013done
4014rm -f $ac_rmfiles
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017case "(($ac_try" in
4018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4019 *) ac_try_echo=$ac_try;;
4020esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4022$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4026 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4028# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4029# in a Makefile. We should not override ac_cv_exeext if it was cached,
4030# so that the user can short-circuit this test for compilers unknown to
4031# Autoconf.
4032for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004033do
4034 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004035 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037 ;;
4038 [ab].out )
4039 # We found the default executable, but exeext='' is most
4040 # certainly right.
4041 break;;
4042 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004044 then :; else
4045 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4046 fi
4047 # We set ac_cv_exeext here because the later test for it is not
4048 # safe: cross compilers may not add the suffix if given an `-o'
4049 # argument, so we may need to know it at that point already.
4050 # Even if this section looks crufty: it has the advantage of
4051 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004052 break;;
4053 * )
4054 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004055 esac
4056done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057test "$ac_cv_exeext" = no && ac_cv_exeext=
4058
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004059else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004060 ac_file=''
4061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004062if test -z "$ac_file"; then :
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4064$as_echo "no" >&6; }
4065$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004066sed 's/^/| /' conftest.$ac_ext >&5
4067
Matthias Kloseb9621712010-04-24 17:59:49 +00004068{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004070as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004071See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004072else
4073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4074$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4077$as_echo_n "checking for C compiler default output file name... " >&6; }
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4079$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004080ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004081
Matthias Kloseb9621712010-04-24 17:59:49 +00004082rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4085$as_echo_n "checking for suffix of executables... " >&6; }
4086if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004087case "(($ac_try" in
4088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4089 *) ac_try_echo=$ac_try;;
4090esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004091eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4092$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004093 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004094 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4096 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004097 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4098# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4099# work properly (i.e., refer to `conftest.exe'), while it won't with
4100# `rm'.
4101for ac_file in conftest.exe conftest conftest.*; do
4102 test -f "$ac_file" || continue
4103 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4106 break;;
4107 * ) break;;
4108 esac
4109done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4112$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004113as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004114See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004116rm -f conftest conftest$ac_cv_exeext
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4118$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004119
4120rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004121EXEEXT=$ac_cv_exeext
4122ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4124/* end confdefs.h. */
4125#include <stdio.h>
4126int
4127main ()
4128{
4129FILE *f = fopen ("conftest.out", "w");
4130 return ferror (f) || fclose (f) != 0;
4131
4132 ;
4133 return 0;
4134}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004136ac_clean_files="$ac_clean_files conftest.out"
4137# Check that the compiler produces executables we can run. If not, either
4138# the compiler is broken, or we cross compile.
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4140$as_echo_n "checking whether we are cross compiling... " >&6; }
4141if test "$cross_compiling" != yes; then
4142 { { ac_try="$ac_link"
4143case "(($ac_try" in
4144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4145 *) ac_try_echo=$ac_try;;
4146esac
4147eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4148$as_echo "$ac_try_echo"; } >&5
4149 (eval "$ac_link") 2>&5
4150 ac_status=$?
4151 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4152 test $ac_status = 0; }
4153 if { ac_try='./conftest$ac_cv_exeext'
4154 { { case "(($ac_try" in
4155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4156 *) ac_try_echo=$ac_try;;
4157esac
4158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4159$as_echo "$ac_try_echo"; } >&5
4160 (eval "$ac_try") 2>&5
4161 ac_status=$?
4162 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4163 test $ac_status = 0; }; }; then
4164 cross_compiling=no
4165 else
4166 if test "$cross_compiling" = maybe; then
4167 cross_compiling=yes
4168 else
4169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004171as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004172If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 fi
4175 fi
4176fi
4177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4178$as_echo "$cross_compiling" >&6; }
4179
4180rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4181ac_clean_files=$ac_clean_files_save
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4183$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004184if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo_n "(cached) " >&6
4186else
4187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004188/* end confdefs.h. */
4189
4190int
4191main ()
4192{
4193
4194 ;
4195 return 0;
4196}
4197_ACEOF
4198rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004199if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200case "(($ac_try" in
4201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4202 *) ac_try_echo=$ac_try;;
4203esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4205$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4209 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 for ac_file in conftest.o conftest.obj conftest.*; do
4211 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4215 break;;
4216 esac
4217done
4218else
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004220sed 's/^/| /' conftest.$ac_ext >&5
4221
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4223$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004224as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004225See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004226fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004227rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004228fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4230$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004231OBJEXT=$ac_cv_objext
4232ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4234$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004235if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004236 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004237else
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004240
Martin v. Löwis11437992002-04-12 09:54:03 +00004241int
4242main ()
4243{
4244#ifndef __GNUC__
4245 choke me
4246#endif
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 ac_compiler_gnu=yes
4254else
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004258ac_cv_c_compiler_gnu=$ac_compiler_gnu
4259
4260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4262$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4263if test $ac_compiler_gnu = yes; then
4264 GCC=yes
4265else
4266 GCC=
4267fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004268ac_test_CFLAGS=${CFLAGS+set}
4269ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4271$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004272if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004274else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 ac_save_c_werror_flag=$ac_c_werror_flag
4276 ac_c_werror_flag=yes
4277 ac_cv_prog_cc_g=no
4278 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004281
Martin v. Löwis11437992002-04-12 09:54:03 +00004282int
4283main ()
4284{
4285
4286 ;
4287 return 0;
4288}
4289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004290if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004291 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292else
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 CFLAGS=""
4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295/* end confdefs.h. */
4296
4297int
4298main ()
4299{
4300
4301 ;
4302 return 0;
4303}
4304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004305if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306
Matthias Kloseb9621712010-04-24 17:59:49 +00004307else
4308 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311/* end confdefs.h. */
4312
4313int
4314main ()
4315{
4316
4317 ;
4318 return 0;
4319}
4320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004321if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4329 ac_c_werror_flag=$ac_save_c_werror_flag
4330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4332$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004333if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004334 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004335elif test $ac_cv_prog_cc_g = yes; then
4336 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004337 CFLAGS="-g -O2"
4338 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004339 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340 fi
4341else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004342 if test "$GCC" = yes; then
4343 CFLAGS="-O2"
4344 else
4345 CFLAGS=
4346 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4349$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004350if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004352else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004354ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004356/* end confdefs.h. */
4357#include <stdarg.h>
4358#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004359struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004360/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4361struct buf { int x; };
4362FILE * (*rcsopen) (struct buf *, struct stat *, int);
4363static char *e (p, i)
4364 char **p;
4365 int i;
4366{
4367 return p[i];
4368}
4369static char *f (char * (*g) (char **, int), char **p, ...)
4370{
4371 char *s;
4372 va_list v;
4373 va_start (v,p);
4374 s = g (p, va_arg (v,int));
4375 va_end (v);
4376 return s;
4377}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004378
4379/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4380 function prototypes and stuff, but not '\xHH' hex character constants.
4381 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004383 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4384 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004386int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4389 inside strings and character constants. */
4390#define FOO(x) 'x'
4391int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4392
Skip Montanaro6dead952003-09-25 14:50:04 +00004393int test (int i, double x);
4394struct s1 {int (*f) (int a);};
4395struct s2 {int (*f) (double a);};
4396int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4397int argc;
4398char **argv;
4399int
4400main ()
4401{
4402return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4403 ;
4404 return 0;
4405}
4406_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4408 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004409do
4410 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414rm -f core conftest.err conftest.$ac_objext
4415 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004416done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004418CC=$ac_save_CC
4419
4420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421# AC_CACHE_VAL
4422case "x$ac_cv_prog_cc_c89" in
4423 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4425$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4428$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004429 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4432$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004433esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004434if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004435
Matthias Kloseb9621712010-04-24 17:59:49 +00004436fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004437
Martin v. Löwis11437992002-04-12 09:54:03 +00004438ac_ext=c
4439ac_cpp='$CPP $CPPFLAGS'
4440ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4441ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4442ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004443
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004444ac_ext=c
4445ac_cpp='$CPP $CPPFLAGS'
4446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4448ac_compiler_gnu=$ac_cv_c_compiler_gnu
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4450$as_echo_n "checking how to run the C preprocessor... " >&6; }
4451# On Suns, sometimes $CPP names a directory.
4452if test -n "$CPP" && test -d "$CPP"; then
4453 CPP=
4454fi
4455if test -z "$CPP"; then
4456 if ${ac_cv_prog_CPP+:} false; then :
4457 $as_echo_n "(cached) " >&6
4458else
4459 # Double quotes because CPP needs to be expanded
4460 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4461 do
4462 ac_preproc_ok=false
4463for ac_c_preproc_warn_flag in '' yes
4464do
4465 # Use a header file that comes with gcc, so configuring glibc
4466 # with a fresh cross-compiler works.
4467 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4468 # <limits.h> exists even on freestanding compilers.
4469 # On the NeXT, cc -E runs the code through the compiler's parser,
4470 # not just through cpp. "Syntax error" is here to catch this case.
4471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4472/* end confdefs.h. */
4473#ifdef __STDC__
4474# include <limits.h>
4475#else
4476# include <assert.h>
4477#endif
4478 Syntax error
4479_ACEOF
4480if ac_fn_c_try_cpp "$LINENO"; then :
4481
4482else
4483 # Broken: fails on valid input.
4484continue
4485fi
4486rm -f conftest.err conftest.i conftest.$ac_ext
4487
4488 # OK, works on sane cases. Now check whether nonexistent headers
4489 # can be detected and how.
4490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491/* end confdefs.h. */
4492#include <ac_nonexistent.h>
4493_ACEOF
4494if ac_fn_c_try_cpp "$LINENO"; then :
4495 # Broken: success on invalid input.
4496continue
4497else
4498 # Passes both tests.
4499ac_preproc_ok=:
4500break
4501fi
4502rm -f conftest.err conftest.i conftest.$ac_ext
4503
4504done
4505# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4506rm -f conftest.i conftest.err conftest.$ac_ext
4507if $ac_preproc_ok; then :
4508 break
4509fi
4510
4511 done
4512 ac_cv_prog_CPP=$CPP
4513
4514fi
4515 CPP=$ac_cv_prog_CPP
4516else
4517 ac_cv_prog_CPP=$CPP
4518fi
4519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4520$as_echo "$CPP" >&6; }
4521ac_preproc_ok=false
4522for ac_c_preproc_warn_flag in '' yes
4523do
4524 # Use a header file that comes with gcc, so configuring glibc
4525 # with a fresh cross-compiler works.
4526 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4527 # <limits.h> exists even on freestanding compilers.
4528 # On the NeXT, cc -E runs the code through the compiler's parser,
4529 # not just through cpp. "Syntax error" is here to catch this case.
4530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4531/* end confdefs.h. */
4532#ifdef __STDC__
4533# include <limits.h>
4534#else
4535# include <assert.h>
4536#endif
4537 Syntax error
4538_ACEOF
4539if ac_fn_c_try_cpp "$LINENO"; then :
4540
4541else
4542 # Broken: fails on valid input.
4543continue
4544fi
4545rm -f conftest.err conftest.i conftest.$ac_ext
4546
4547 # OK, works on sane cases. Now check whether nonexistent headers
4548 # can be detected and how.
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551#include <ac_nonexistent.h>
4552_ACEOF
4553if ac_fn_c_try_cpp "$LINENO"; then :
4554 # Broken: success on invalid input.
4555continue
4556else
4557 # Passes both tests.
4558ac_preproc_ok=:
4559break
4560fi
4561rm -f conftest.err conftest.i conftest.$ac_ext
4562
4563done
4564# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4565rm -f conftest.i conftest.err conftest.$ac_ext
4566if $ac_preproc_ok; then :
4567
4568else
4569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4571as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4572See \`config.log' for more details" "$LINENO" 5; }
4573fi
4574
4575ac_ext=c
4576ac_cpp='$CPP $CPPFLAGS'
4577ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4578ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4579ac_compiler_gnu=$ac_cv_c_compiler_gnu
4580
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4582$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4583if ${ac_cv_path_GREP+:} false; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 if test -z "$GREP"; then
4587 ac_path_GREP_found=false
4588 # Loop through the user's path and test for each of PROGNAME-LIST
4589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4591do
4592 IFS=$as_save_IFS
4593 test -z "$as_dir" && as_dir=.
4594 for ac_prog in grep ggrep; do
4595 for ac_exec_ext in '' $ac_executable_extensions; do
4596 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4597 as_fn_executable_p "$ac_path_GREP" || continue
4598# Check for GNU ac_path_GREP and select it if it is found.
4599 # Check for GNU $ac_path_GREP
4600case `"$ac_path_GREP" --version 2>&1` in
4601*GNU*)
4602 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4603*)
4604 ac_count=0
4605 $as_echo_n 0123456789 >"conftest.in"
4606 while :
4607 do
4608 cat "conftest.in" "conftest.in" >"conftest.tmp"
4609 mv "conftest.tmp" "conftest.in"
4610 cp "conftest.in" "conftest.nl"
4611 $as_echo 'GREP' >> "conftest.nl"
4612 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4613 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4614 as_fn_arith $ac_count + 1 && ac_count=$as_val
4615 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4616 # Best one so far, save it but keep looking for a better one
4617 ac_cv_path_GREP="$ac_path_GREP"
4618 ac_path_GREP_max=$ac_count
4619 fi
4620 # 10*(2^10) chars as input seems more than enough
4621 test $ac_count -gt 10 && break
4622 done
4623 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4624esac
4625
4626 $ac_path_GREP_found && break 3
4627 done
4628 done
4629 done
4630IFS=$as_save_IFS
4631 if test -z "$ac_cv_path_GREP"; then
4632 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4633 fi
4634else
4635 ac_cv_path_GREP=$GREP
4636fi
4637
4638fi
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4640$as_echo "$ac_cv_path_GREP" >&6; }
4641 GREP="$ac_cv_path_GREP"
4642
4643
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004644
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004645
4646
Matthias Kloseb9621712010-04-24 17:59:49 +00004647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4648$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004650# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004651if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004652 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004653
4654 case $withval in
4655 no) with_cxx_main=no
4656 MAINCC='$(CC)';;
4657 yes) with_cxx_main=yes
4658 MAINCC='$(CXX)';;
4659 *) with_cxx_main=yes
4660 MAINCC=$withval
4661 if test -z "$CXX"
4662 then
4663 CXX=$withval
4664 fi;;
4665 esac
4666else
4667
4668 with_cxx_main=no
4669 MAINCC='$(CC)'
4670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004671fi
4672
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4674$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004675
4676preset_cxx="$CXX"
4677if test -z "$CXX"
4678then
4679 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004680 gcc) if test -n "$ac_tool_prefix"; then
4681 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4682set dummy ${ac_tool_prefix}g++; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_CXX+:} false; then :
4686 $as_echo_n "(cached) " >&6
4687else
4688 case $CXX in
4689 [\\/]* | ?:[\\/]*)
4690 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4691 ;;
4692 *)
4693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in notfound
4695do
4696 IFS=$as_save_IFS
4697 test -z "$as_dir" && as_dir=.
4698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004700 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702 break 2
4703 fi
4704done
4705 done
4706IFS=$as_save_IFS
4707
4708 ;;
4709esac
4710fi
4711CXX=$ac_cv_path_CXX
4712if test -n "$CXX"; then
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4714$as_echo "$CXX" >&6; }
4715else
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721fi
4722if test -z "$ac_cv_path_CXX"; then
4723 ac_pt_CXX=$CXX
4724 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4727$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728if ${ac_cv_path_ac_pt_CXX+:} false; then :
4729 $as_echo_n "(cached) " >&6
4730else
4731 case $ac_pt_CXX in
4732 [\\/]* | ?:[\\/]*)
4733 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4734 ;;
4735 *)
4736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4737for as_dir in notfound
4738do
4739 IFS=$as_save_IFS
4740 test -z "$as_dir" && as_dir=.
4741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004743 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4744 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4745 break 2
4746 fi
4747done
4748 done
4749IFS=$as_save_IFS
4750
4751 ;;
4752esac
4753fi
4754ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4755if test -n "$ac_pt_CXX"; then
4756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4757$as_echo "$ac_pt_CXX" >&6; }
4758else
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4760$as_echo "no" >&6; }
4761fi
4762
4763 if test "x$ac_pt_CXX" = x; then
4764 CXX="g++"
4765 else
4766 case $cross_compiling:$ac_tool_warned in
4767yes:)
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4769$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4770ac_tool_warned=yes ;;
4771esac
4772 CXX=$ac_pt_CXX
4773 fi
4774else
4775 CXX="$ac_cv_path_CXX"
4776fi
4777 ;;
4778 cc) if test -n "$ac_tool_prefix"; then
4779 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4780set dummy ${ac_tool_prefix}c++; ac_word=$2
4781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4782$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004783if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785else
4786 case $CXX in
4787 [\\/]* | ?:[\\/]*)
4788 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4789 ;;
4790 *)
4791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4792for as_dir in notfound
4793do
4794 IFS=$as_save_IFS
4795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004800 break 2
4801 fi
4802done
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004804IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 ;;
4807esac
4808fi
4809CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004810if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4812$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004813else
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4815$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004817
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818
4819fi
4820if test -z "$ac_cv_path_CXX"; then
4821 ac_pt_CXX=$CXX
4822 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004826if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831 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 +00004832 ;;
4833 *)
4834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in notfound
4836do
4837 IFS=$as_save_IFS
4838 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004841 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843 break 2
4844 fi
4845done
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004847IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 ;;
4850esac
4851fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004852ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4853if test -n "$ac_pt_CXX"; then
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4855$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004856else
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004860
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004861 if test "x$ac_pt_CXX" = x; then
4862 CXX="c++"
4863 else
4864 case $cross_compiling:$ac_tool_warned in
4865yes:)
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4868ac_tool_warned=yes ;;
4869esac
4870 CXX=$ac_pt_CXX
4871 fi
4872else
4873 CXX="$ac_cv_path_CXX"
4874fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004875 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876 clang|*/clang) if test -n "$ac_tool_prefix"; then
4877 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4878set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4880$as_echo_n "checking for $ac_word... " >&6; }
4881if ${ac_cv_path_CXX+:} false; then :
4882 $as_echo_n "(cached) " >&6
4883else
4884 case $CXX in
4885 [\\/]* | ?:[\\/]*)
4886 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4887 ;;
4888 *)
4889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4890for as_dir in notfound
4891do
4892 IFS=$as_save_IFS
4893 test -z "$as_dir" && as_dir=.
4894 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4898 break 2
4899 fi
4900done
4901 done
4902IFS=$as_save_IFS
4903
Ned Deilycbfb9a52012-06-23 16:02:19 -07004904 ;;
4905esac
4906fi
4907CXX=$ac_cv_path_CXX
4908if test -n "$CXX"; then
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4910$as_echo "$CXX" >&6; }
4911else
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4913$as_echo "no" >&6; }
4914fi
4915
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004916
4917fi
4918if test -z "$ac_cv_path_CXX"; then
4919 ac_pt_CXX=$CXX
4920 # Extract the first word of "clang++", so it can be a program name with args.
4921set dummy clang++; ac_word=$2
4922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4923$as_echo_n "checking for $ac_word... " >&6; }
4924if ${ac_cv_path_ac_pt_CXX+:} false; then :
4925 $as_echo_n "(cached) " >&6
4926else
4927 case $ac_pt_CXX in
4928 [\\/]* | ?:[\\/]*)
4929 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4930 ;;
4931 *)
4932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4933for as_dir in notfound
4934do
4935 IFS=$as_save_IFS
4936 test -z "$as_dir" && as_dir=.
4937 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004939 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4941 break 2
4942 fi
4943done
4944 done
4945IFS=$as_save_IFS
4946
4947 ;;
4948esac
4949fi
4950ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4951if test -n "$ac_pt_CXX"; then
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4953$as_echo "$ac_pt_CXX" >&6; }
4954else
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956$as_echo "no" >&6; }
4957fi
4958
4959 if test "x$ac_pt_CXX" = x; then
4960 CXX="clang++"
4961 else
4962 case $cross_compiling:$ac_tool_warned in
4963yes:)
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4965$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4966ac_tool_warned=yes ;;
4967esac
4968 CXX=$ac_pt_CXX
4969 fi
4970else
4971 CXX="$ac_cv_path_CXX"
4972fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004973 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004974 icc|*/icc) if test -n "$ac_tool_prefix"; then
4975 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4976set dummy ${ac_tool_prefix}icpc; ac_word=$2
4977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4978$as_echo_n "checking for $ac_word... " >&6; }
4979if ${ac_cv_path_CXX+:} false; then :
4980 $as_echo_n "(cached) " >&6
4981else
4982 case $CXX in
4983 [\\/]* | ?:[\\/]*)
4984 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4985 ;;
4986 *)
4987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4988for as_dir in notfound
4989do
4990 IFS=$as_save_IFS
4991 test -z "$as_dir" && as_dir=.
4992 for ac_exec_ext in '' $ac_executable_extensions; do
4993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4994 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4996 break 2
4997 fi
4998done
4999 done
5000IFS=$as_save_IFS
5001
5002 ;;
5003esac
5004fi
5005CXX=$ac_cv_path_CXX
5006if test -n "$CXX"; then
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5008$as_echo "$CXX" >&6; }
5009else
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5011$as_echo "no" >&6; }
5012fi
5013
5014
5015fi
5016if test -z "$ac_cv_path_CXX"; then
5017 ac_pt_CXX=$CXX
5018 # Extract the first word of "icpc", so it can be a program name with args.
5019set dummy icpc; ac_word=$2
5020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
5022if ${ac_cv_path_ac_pt_CXX+:} false; then :
5023 $as_echo_n "(cached) " >&6
5024else
5025 case $ac_pt_CXX in
5026 [\\/]* | ?:[\\/]*)
5027 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5028 ;;
5029 *)
5030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in notfound
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
5035 for ac_exec_ext in '' $ac_executable_extensions; do
5036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5037 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5039 break 2
5040 fi
5041done
5042 done
5043IFS=$as_save_IFS
5044
5045 ;;
5046esac
5047fi
5048ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5049if test -n "$ac_pt_CXX"; then
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5051$as_echo "$ac_pt_CXX" >&6; }
5052else
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5054$as_echo "no" >&6; }
5055fi
5056
5057 if test "x$ac_pt_CXX" = x; then
5058 CXX="icpc"
5059 else
5060 case $cross_compiling:$ac_tool_warned in
5061yes:)
5062{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5063$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5064ac_tool_warned=yes ;;
5065esac
5066 CXX=$ac_pt_CXX
5067 fi
5068else
5069 CXX="$ac_cv_path_CXX"
5070fi
5071 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072 esac
5073 if test "$CXX" = "notfound"
5074 then
5075 CXX=""
5076 fi
5077fi
5078if test -z "$CXX"
5079then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 if test -n "$ac_tool_prefix"; then
5081 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5082 do
5083 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5084set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005087if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089else
5090 if test -n "$CXX"; then
5091 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5092else
5093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096 IFS=$as_save_IFS
5097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005100 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102 break 2
5103 fi
5104done
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107
5108fi
5109fi
5110CXX=$ac_cv_prog_CXX
5111if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5113$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114else
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005117fi
5118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005119
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005120 test -n "$CXX" && break
5121 done
5122fi
5123if test -z "$CXX"; then
5124 ac_ct_CXX=$CXX
5125 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5126do
5127 # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5132 $as_echo_n "(cached) " >&6
5133else
5134 if test -n "$ac_ct_CXX"; then
5135 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5136else
5137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140 IFS=$as_save_IFS
5141 test -z "$as_dir" && as_dir=.
5142 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005144 ac_cv_prog_ac_ct_CXX="$ac_prog"
5145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146 break 2
5147 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005148done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005149 done
5150IFS=$as_save_IFS
5151
5152fi
5153fi
5154ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5155if test -n "$ac_ct_CXX"; then
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5157$as_echo "$ac_ct_CXX" >&6; }
5158else
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160$as_echo "no" >&6; }
5161fi
5162
5163
5164 test -n "$ac_ct_CXX" && break
5165done
5166
5167 if test "x$ac_ct_CXX" = x; then
5168 CXX="notfound"
5169 else
5170 case $cross_compiling:$ac_tool_warned in
5171yes:)
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5174ac_tool_warned=yes ;;
5175esac
5176 CXX=$ac_ct_CXX
5177 fi
5178fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179
5180 if test "$CXX" = "notfound"
5181 then
5182 CXX=""
5183 fi
5184fi
5185if test "$preset_cxx" != "$CXX"
5186then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005187 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005188
5189 By default, distutils will build C++ extension modules with \"$CXX\".
5190 If this is not intended, then set CXX on the configure command line.
5191 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005192$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005193
5194 By default, distutils will build C++ extension modules with \"$CXX\".
5195 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005196 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197fi
5198
5199
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5201
5202
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5204$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5205cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005206#undef bfin
5207#undef cris
5208#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005209#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef hppa
5211#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005212#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005213#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005214#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005215#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005216#undef unix
5217#if defined(__linux__)
5218# if defined(__x86_64__) && defined(__LP64__)
5219 x86_64-linux-gnu
5220# elif defined(__x86_64__) && defined(__ILP32__)
5221 x86_64-linux-gnux32
5222# elif defined(__i386__)
5223 i386-linux-gnu
5224# elif defined(__aarch64__) && defined(__AARCH64EL__)
5225# if defined(__ILP32__)
5226 aarch64_ilp32-linux-gnu
5227# else
5228 aarch64-linux-gnu
5229# endif
5230# elif defined(__aarch64__) && defined(__AARCH64EB__)
5231# if defined(__ILP32__)
5232 aarch64_be_ilp32-linux-gnu
5233# else
5234 aarch64_be-linux-gnu
5235# endif
5236# elif defined(__alpha__)
5237 alpha-linux-gnu
5238# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5239# if defined(__ARMEL__)
5240 arm-linux-gnueabihf
5241# else
5242 armeb-linux-gnueabihf
5243# endif
5244# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5245# if defined(__ARMEL__)
5246 arm-linux-gnueabi
5247# else
5248 armeb-linux-gnueabi
5249# endif
5250# elif defined(__hppa__)
5251 hppa-linux-gnu
5252# elif defined(__ia64__)
5253 ia64-linux-gnu
5254# elif defined(__m68k__) && !defined(__mcoldfire__)
5255 m68k-linux-gnu
5256# elif defined(__mips_hard_float) && defined(_MIPSEL)
5257# if _MIPS_SIM == _ABIO32
5258 mipsel-linux-gnu
5259# elif _MIPS_SIM == _ABIN32
5260 mips64el-linux-gnuabin32
5261# elif _MIPS_SIM == _ABI64
5262 mips64el-linux-gnuabi64
5263# else
5264# error unknown platform triplet
5265# endif
5266# elif defined(__mips_hard_float)
5267# if _MIPS_SIM == _ABIO32
5268 mips-linux-gnu
5269# elif _MIPS_SIM == _ABIN32
5270 mips64-linux-gnuabin32
5271# elif _MIPS_SIM == _ABI64
5272 mips64-linux-gnuabi64
5273# else
5274# error unknown platform triplet
5275# endif
5276# elif defined(__or1k__)
5277 or1k-linux-gnu
5278# elif defined(__powerpc__) && defined(__SPE__)
5279 powerpc-linux-gnuspe
5280# elif defined(__powerpc64__)
5281# if defined(__LITTLE_ENDIAN__)
5282 powerpc64le-linux-gnu
5283# else
5284 powerpc64-linux-gnu
5285# endif
5286# elif defined(__powerpc__)
5287 powerpc-linux-gnu
5288# elif defined(__s390x__)
5289 s390x-linux-gnu
5290# elif defined(__s390__)
5291 s390-linux-gnu
5292# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5293 sh4-linux-gnu
5294# elif defined(__sparc__) && defined(__arch64__)
5295 sparc64-linux-gnu
5296# elif defined(__sparc__)
5297 sparc-linux-gnu
5298# else
5299# error unknown platform triplet
5300# endif
5301#elif defined(__FreeBSD_kernel__)
5302# if defined(__LP64__)
5303 x86_64-kfreebsd-gnu
5304# elif defined(__i386__)
5305 i386-kfreebsd-gnu
5306# else
5307# error unknown platform triplet
5308# endif
5309#elif defined(__gnu_hurd__)
5310 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005311#elif defined(__APPLE__)
5312 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313#else
5314# error unknown platform triplet
5315#endif
5316
5317EOF
5318
5319if $CPP conftest.c >conftest.out 2>/dev/null; then
5320 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5322$as_echo "$PLATFORM_TRIPLET" >&6; }
5323else
5324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5325$as_echo "none" >&6; }
5326fi
5327rm -f conftest.c conftest.out
5328
5329if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5330 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5331 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5332 fi
5333fi
5334PLATDIR=plat-$MACHDEP
5335
5336
5337
5338
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5340$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5341save_LDFLAGS="$LDFLAGS"
5342LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005343
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5345/* end confdefs.h. */
5346
5347int
5348main ()
5349{
5350
5351 ;
5352 return 0;
5353}
5354_ACEOF
5355if ac_fn_c_try_link "$LINENO"; then :
5356 NO_AS_NEEDED="-Wl,--no-as-needed"
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5358$as_echo "yes" >&6; }
5359else
5360 NO_AS_NEEDED=""
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5362$as_echo "no" >&6; }
5363fi
5364rm -f core conftest.err conftest.$ac_objext \
5365 conftest$ac_exeext conftest.$ac_ext
5366LDFLAGS="$save_LDFLAGS"
5367
5368
5369
5370# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371
Matthias Kloseb9621712010-04-24 17:59:49 +00005372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5373$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005374if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376else
5377 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5378 then ac_cv_path_EGREP="$GREP -E"
5379 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 # Loop through the user's path and test for each of PROGNAME-LIST
5383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5385do
5386 IFS=$as_save_IFS
5387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 for ac_prog in egrep; do
5389 for ac_exec_ext in '' $ac_executable_extensions; do
5390 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005391 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005392# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 # Check for GNU $ac_path_EGREP
5394case `"$ac_path_EGREP" --version 2>&1` in
5395*GNU*)
5396 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5397*)
5398 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 while :
5401 do
5402 cat "conftest.in" "conftest.in" >"conftest.tmp"
5403 mv "conftest.tmp" "conftest.in"
5404 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5407 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5410 # Best one so far, save it but keep looking for a better one
5411 ac_cv_path_EGREP="$ac_path_EGREP"
5412 ac_path_EGREP_max=$ac_count
5413 fi
5414 # 10*(2^10) chars as input seems more than enough
5415 test $ac_count -gt 10 && break
5416 done
5417 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5418esac
5419
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 $ac_path_EGREP_found && break 3
5421 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005426 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 +00005427 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428else
5429 ac_cv_path_EGREP=$EGREP
5430fi
5431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 fi
5433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5435$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005437
5438
Matthias Kloseb9621712010-04-24 17:59:49 +00005439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5440$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005441if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $as_echo_n "(cached) " >&6
5443else
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005445/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005446#include <stdlib.h>
5447#include <stdarg.h>
5448#include <string.h>
5449#include <float.h>
5450
5451int
5452main ()
5453{
5454
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459if ac_fn_c_try_compile "$LINENO"; then :
5460 ac_cv_header_stdc=yes
5461else
5462 ac_cv_header_stdc=no
5463fi
5464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5465
5466if test $ac_cv_header_stdc = yes; then
5467 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5469/* end confdefs.h. */
5470#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005471
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005472_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005476else
Matthias Kloseb9621712010-04-24 17:59:49 +00005477 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005478fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005479rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
Matthias Kloseb9621712010-04-24 17:59:49 +00005481fi
5482
5483if test $ac_cv_header_stdc = yes; then
5484 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5486/* end confdefs.h. */
5487#include <stdlib.h>
5488
5489_ACEOF
5490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5491 $EGREP "free" >/dev/null 2>&1; then :
5492
5493else
5494 ac_cv_header_stdc=no
5495fi
5496rm -f conftest*
5497
5498fi
5499
5500if test $ac_cv_header_stdc = yes; then
5501 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5502 if test "$cross_compiling" = yes; then :
5503 :
5504else
5505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5506/* end confdefs.h. */
5507#include <ctype.h>
5508#include <stdlib.h>
5509#if ((' ' & 0x0FF) == 0x020)
5510# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5511# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5512#else
5513# define ISLOWER(c) \
5514 (('a' <= (c) && (c) <= 'i') \
5515 || ('j' <= (c) && (c) <= 'r') \
5516 || ('s' <= (c) && (c) <= 'z'))
5517# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5518#endif
5519
5520#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5521int
5522main ()
5523{
5524 int i;
5525 for (i = 0; i < 256; i++)
5526 if (XOR (islower (i), ISLOWER (i))
5527 || toupper (i) != TOUPPER (i))
5528 return 2;
5529 return 0;
5530}
5531_ACEOF
5532if ac_fn_c_try_run "$LINENO"; then :
5533
5534else
5535 ac_cv_header_stdc=no
5536fi
5537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5538 conftest.$ac_objext conftest.beam conftest.$ac_ext
5539fi
5540
5541fi
5542fi
5543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5544$as_echo "$ac_cv_header_stdc" >&6; }
5545if test $ac_cv_header_stdc = yes; then
5546
5547$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5548
5549fi
5550
5551# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5552for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5553 inttypes.h stdint.h unistd.h
5554do :
5555 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5556ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5557"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005558if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 cat >>confdefs.h <<_ACEOF
5560#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5561_ACEOF
5562
5563fi
5564
5565done
5566
5567
5568
5569 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 +02005570if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005571 MINIX=yes
5572else
5573 MINIX=
5574fi
5575
5576
5577 if test "$MINIX" = yes; then
5578
5579$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5580
5581
5582$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5583
5584
5585$as_echo "#define _MINIX 1" >>confdefs.h
5586
5587 fi
5588
5589
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5591$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005592if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005593 $as_echo_n "(cached) " >&6
5594else
5595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5596/* end confdefs.h. */
5597
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005598# define __EXTENSIONS__ 1
5599 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005600int
5601main ()
5602{
5603
5604 ;
5605 return 0;
5606}
5607_ACEOF
5608if ac_fn_c_try_compile "$LINENO"; then :
5609 ac_cv_safe_to_define___extensions__=yes
5610else
5611 ac_cv_safe_to_define___extensions__=no
5612fi
5613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5614fi
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5616$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5617 test $ac_cv_safe_to_define___extensions__ = yes &&
5618 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5619
5620 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5621
5622 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5623
5624 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5625
5626 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5627
5628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630# Check for unsupported systems
5631case $ac_sys_system/$ac_sys_release in
5632atheos*|Linux*/1*)
5633 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5634 echo See README for details.
5635 exit 1;;
5636esac
5637
5638
Matthias Kloseb9621712010-04-24 17:59:49 +00005639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5640$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
5642# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005643if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644 withval=$with_suffix;
5645 case $withval in
5646 no) EXEEXT=;;
5647 yes) EXEEXT=.exe;;
5648 *) EXEEXT=$withval;;
5649 esac
5650fi
5651
Matthias Kloseb9621712010-04-24 17:59:49 +00005652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5653$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654
5655# Test whether we're running on a non-case-sensitive system, in which
5656# case we give a warning if no ext is given
5657
Matthias Kloseb9621712010-04-24 17:59:49 +00005658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5659$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660if test ! -d CaseSensitiveTestDir; then
5661mkdir CaseSensitiveTestDir
5662fi
5663
5664if test -d casesensitivetestdir
5665then
Matthias Kloseb9621712010-04-24 17:59:49 +00005666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5667$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 BUILDEXEEXT=.exe
5669else
Matthias Kloseb9621712010-04-24 17:59:49 +00005670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5671$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 BUILDEXEEXT=$EXEEXT
5673fi
5674rmdir CaseSensitiveTestDir
5675
5676case $MACHDEP in
5677bsdos*)
5678 case $CC in
5679 gcc) CC="$CC -D_HAVE_BSDI";;
5680 esac;;
5681esac
5682
5683case $ac_sys_system in
5684hp*|HP*)
5685 case $CC in
5686 cc|*/cc) CC="$CC -Ae";;
5687 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688esac
5689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5692$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693if test -z "$LIBRARY"
5694then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005695 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5698$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
5700# LDLIBRARY is the name of the library to link against (as opposed to the
5701# name of the library into which to insert object files). BLDLIBRARY is also
5702# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5703# is blank as the main program is not linked directly against LDLIBRARY.
5704# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5705# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5706# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5707# DLLLIBRARY is the shared (i.e., DLL) library.
5708#
5709# RUNSHARED is used to run shared python without installed libraries
5710#
5711# INSTSONAME is the name of the shared library that will be use to install
5712# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005713#
5714# LDVERSION is the shared library version number, normally the Python version
5715# with the ABI build flags appended.
5716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
5718
5719
5720
5721
5722
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724LDLIBRARY="$LIBRARY"
5725BLDLIBRARY='$(LDLIBRARY)'
5726INSTSONAME='$(LDLIBRARY)'
5727DLLLIBRARY=''
5728LDLIBRARYDIR=''
5729RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005730LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731
5732# LINKCC is the command that links the python executable -- default is $(CC).
5733# If CXX is set, and if it is needed to link a main function that was
5734# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5735# python might then depend on the C++ runtime
5736# This is altered for AIX in order to build the export list before
5737# linking.
5738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5740$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741if test -z "$LINKCC"
5742then
5743 LINKCC='$(PURIFY) $(MAINCC)'
5744 case $ac_sys_system in
5745 AIX*)
5746 exp_extra="\"\""
5747 if test $ac_sys_release -ge 5 -o \
5748 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5749 exp_extra="."
5750 fi
5751 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 QNX*)
5753 # qcc must be used because the other compilers do not
5754 # support -N.
5755 LINKCC=qcc;;
5756 esac
5757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5759$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760
5761# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5762# make sure we default having it set to "no": this is used by
5763# distutils.unixccompiler to know if it should add --enable-new-dtags
5764# to linker command lines, and failing to detect GNU ld simply results
5765# in the same bahaviour as before.
5766
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5768$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769ac_prog=ld
5770if test "$GCC" = yes; then
5771 ac_prog=`$CC -print-prog-name=ld`
5772fi
5773case `"$ac_prog" -V 2>&1 < /dev/null` in
5774 *GNU*)
5775 GNULD=yes;;
5776 *)
5777 GNULD=no;;
5778esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5780$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5783$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005784if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005785 $as_echo_n "(cached) " >&6
5786else
5787 ac_cv_c_inline=no
5788for ac_kw in inline __inline__ __inline; do
5789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5790/* end confdefs.h. */
5791#ifndef __cplusplus
5792typedef int foo_t;
5793static $ac_kw foo_t static_foo () {return 0; }
5794$ac_kw foo_t foo () {return 0; }
5795#endif
5796
5797_ACEOF
5798if ac_fn_c_try_compile "$LINENO"; then :
5799 ac_cv_c_inline=$ac_kw
5800fi
5801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5802 test "$ac_cv_c_inline" != no && break
5803done
5804
5805fi
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5807$as_echo "$ac_cv_c_inline" >&6; }
5808
5809case $ac_cv_c_inline in
5810 inline | yes) ;;
5811 *)
5812 case $ac_cv_c_inline in
5813 no) ac_val=;;
5814 *) ac_val=$ac_cv_c_inline;;
5815 esac
5816 cat >>confdefs.h <<_ACEOF
5817#ifndef __cplusplus
5818#define inline $ac_val
5819#endif
5820_ACEOF
5821 ;;
5822esac
5823
5824if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005825
5826$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005827
5828
5829fi
5830
5831
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5833$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005835if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836 enableval=$enable_shared;
5837fi
5838
5839
5840if test -z "$enable_shared"
5841then
5842 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005843 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844 enable_shared="yes";;
5845 *)
5846 enable_shared="no";;
5847 esac
5848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5850$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5853$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005855if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005856 enableval=$enable_profiling;
5857fi
5858
5859if test "x$enable_profiling" = xyes; then
5860 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005861 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863/* end confdefs.h. */
5864int main() { return 0; }
5865_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866if ac_fn_c_try_link "$LINENO"; then :
5867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005869 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871rm -f core conftest.err conftest.$ac_objext \
5872 conftest$ac_exeext conftest.$ac_ext
5873 CC="$ac_save_cc"
5874else
5875 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5878$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880if test "x$enable_profiling" = xyes; then
5881 BASECFLAGS="-pg $BASECFLAGS"
5882 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
5884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5886$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887
5888# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5889# library that we build, but we do not want to link against it (we
5890# will find it with a -framework option). For this reason there is an
5891# extra variable BLDLIBRARY against which Python and the extension
5892# modules are linked, BLDLIBRARY. This is normally the same as
5893# LDLIBRARY, but empty for MacOSX framework builds.
5894if test "$enable_framework"
5895then
5896 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005897 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 BLDLIBRARY=''
5899else
5900 BLDLIBRARY='$(LDLIBRARY)'
5901fi
5902
5903# Other platforms follow
5904if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005905 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906
Matthias Kloseb9621712010-04-24 17:59:49 +00005907$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
5909 case $ac_sys_system in
5910 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).dll.a'
5912 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
5914 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
5916 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005919 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005920 then
5921 PY3LIBRARY=libpython3.so
5922 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005924 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
5926 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005929 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005930 then
5931 PY3LIBRARY=libpython3.so
5932 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
5934 hp*|HP*)
5935 case `uname -m` in
5936 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
5939 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
5942 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005943 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005944 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).dylib'
5948 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005949 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005951 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005952 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005953 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005954 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955
5956 esac
5957else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005958 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 case $ac_sys_system in
5960 CYGWIN*)
5961 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
5964 esac
5965fi
5966
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005967if test "$cross_compiling" = yes; then
5968 RUNSHARED=
5969fi
5970
Matthias Kloseb9621712010-04-24 17:59:49 +00005971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5972$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973
5974if test -n "$ac_tool_prefix"; then
5975 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5976set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5978$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005979if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 if test -n "$RANLIB"; then
5983 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5984else
5985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH
5987do
5988 IFS=$as_save_IFS
5989 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 break 2
5995 fi
5996done
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998IFS=$as_save_IFS
5999
6000fi
6001fi
6002RANLIB=$ac_cv_prog_RANLIB
6003if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6005$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006else
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6008$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009fi
6010
6011
6012fi
6013if test -z "$ac_cv_prog_RANLIB"; then
6014 ac_ct_RANLIB=$RANLIB
6015 # Extract the first word of "ranlib", so it can be a program name with args.
6016set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6018$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006019if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021else
6022 if test -n "$ac_ct_RANLIB"; then
6023 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6024else
6025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6026for as_dir in $PATH
6027do
6028 IFS=$as_save_IFS
6029 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006030 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034 break 2
6035 fi
6036done
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038IFS=$as_save_IFS
6039
6040fi
6041fi
6042ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6043if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6045$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046else
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049fi
6050
6051 if test "x$ac_ct_RANLIB" = x; then
6052 RANLIB=":"
6053 else
6054 case $cross_compiling:$ac_tool_warned in
6055yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058ac_tool_warned=yes ;;
6059esac
6060 RANLIB=$ac_ct_RANLIB
6061 fi
6062else
6063 RANLIB="$ac_cv_prog_RANLIB"
6064fi
6065
6066
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006067if test -n "$ac_tool_prefix"; then
6068 for ac_prog in ar aal
6069 do
6070 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006074if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076else
6077 if test -n "$AR"; then
6078 ac_cv_prog_AR="$AR" # Let the user override the test.
6079else
6080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083 IFS=$as_save_IFS
6084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006087 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089 break 2
6090 fi
6091done
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093IFS=$as_save_IFS
6094
6095fi
6096fi
6097AR=$ac_cv_prog_AR
6098if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6100$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101else
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104fi
6105
6106
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006107 test -n "$AR" && break
6108 done
6109fi
6110if test -z "$AR"; then
6111 ac_ct_AR=$AR
6112 for ac_prog in ar aal
6113do
6114 # Extract the first word of "$ac_prog", so it can be a program name with args.
6115set dummy $ac_prog; ac_word=$2
6116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6117$as_echo_n "checking for $ac_word... " >&6; }
6118if ${ac_cv_prog_ac_ct_AR+:} false; then :
6119 $as_echo_n "(cached) " >&6
6120else
6121 if test -n "$ac_ct_AR"; then
6122 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6123else
6124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6125for as_dir in $PATH
6126do
6127 IFS=$as_save_IFS
6128 test -z "$as_dir" && as_dir=.
6129 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006131 ac_cv_prog_ac_ct_AR="$ac_prog"
6132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6133 break 2
6134 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006136 done
6137IFS=$as_save_IFS
6138
6139fi
6140fi
6141ac_ct_AR=$ac_cv_prog_ac_ct_AR
6142if test -n "$ac_ct_AR"; then
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6144$as_echo "$ac_ct_AR" >&6; }
6145else
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6147$as_echo "no" >&6; }
6148fi
6149
6150
6151 test -n "$ac_ct_AR" && break
6152done
6153
6154 if test "x$ac_ct_AR" = x; then
6155 AR="ar"
6156 else
6157 case $cross_compiling:$ac_tool_warned in
6158yes:)
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6161ac_tool_warned=yes ;;
6162esac
6163 AR=$ac_ct_AR
6164 fi
6165fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166
6167
6168# tweak ARFLAGS only if the user didn't set it on the command line
6169
6170if test -z "$ARFLAGS"
6171then
6172 ARFLAGS="rc"
6173fi
6174
doko@ubuntu.com58844492012-06-30 18:25:32 +02006175if test -n "$ac_tool_prefix"; then
6176 for ac_prog in readelf
6177 do
6178 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6179set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6181$as_echo_n "checking for $ac_word... " >&6; }
6182if ${ac_cv_prog_READELF+:} false; then :
6183 $as_echo_n "(cached) " >&6
6184else
6185 if test -n "$READELF"; then
6186 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6187else
6188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6189for as_dir in $PATH
6190do
6191 IFS=$as_save_IFS
6192 test -z "$as_dir" && as_dir=.
6193 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006195 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6197 break 2
6198 fi
6199done
6200 done
6201IFS=$as_save_IFS
6202
6203fi
6204fi
6205READELF=$ac_cv_prog_READELF
6206if test -n "$READELF"; then
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6208$as_echo "$READELF" >&6; }
6209else
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6211$as_echo "no" >&6; }
6212fi
6213
6214
6215 test -n "$READELF" && break
6216 done
6217fi
6218if test -z "$READELF"; then
6219 ac_ct_READELF=$READELF
6220 for ac_prog in readelf
6221do
6222 # Extract the first word of "$ac_prog", so it can be a program name with args.
6223set dummy $ac_prog; ac_word=$2
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225$as_echo_n "checking for $ac_word... " >&6; }
6226if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6227 $as_echo_n "(cached) " >&6
6228else
6229 if test -n "$ac_ct_READELF"; then
6230 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6231else
6232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6233for as_dir in $PATH
6234do
6235 IFS=$as_save_IFS
6236 test -z "$as_dir" && as_dir=.
6237 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006239 ac_cv_prog_ac_ct_READELF="$ac_prog"
6240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6241 break 2
6242 fi
6243done
6244 done
6245IFS=$as_save_IFS
6246
6247fi
6248fi
6249ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6250if test -n "$ac_ct_READELF"; then
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6252$as_echo "$ac_ct_READELF" >&6; }
6253else
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255$as_echo "no" >&6; }
6256fi
6257
6258
6259 test -n "$ac_ct_READELF" && break
6260done
6261
6262 if test "x$ac_ct_READELF" = x; then
6263 READELF=":"
6264 else
6265 case $cross_compiling:$ac_tool_warned in
6266yes:)
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6268$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6269ac_tool_warned=yes ;;
6270esac
6271 READELF=$ac_ct_READELF
6272 fi
6273fi
6274
6275if test "$cross_compiling" = yes; then
6276 case "$READELF" in
6277 readelf|:)
6278 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6279 ;;
6280 esac
6281fi
6282
6283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284
Matthias Klosec4c48422012-10-21 23:05:35 +02006285for ac_prog in python$PACKAGE_VERSION python3 python
6286do
6287 # Extract the first word of "$ac_prog", so it can be a program name with args.
6288set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6290$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006291if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006292 $as_echo_n "(cached) " >&6
6293else
Matthias Klosec4c48422012-10-21 23:05:35 +02006294 if test -n "$PYTHON"; then
6295 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006296else
6297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6298for as_dir in $PATH
6299do
6300 IFS=$as_save_IFS
6301 test -z "$as_dir" && as_dir=.
6302 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006303 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006304 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6306 break 2
6307 fi
6308done
6309 done
6310IFS=$as_save_IFS
6311
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006312fi
6313fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006314PYTHON=$ac_cv_prog_PYTHON
6315if test -n "$PYTHON"; then
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6317$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006318else
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6320$as_echo "no" >&6; }
6321fi
6322
6323
Matthias Klosec4c48422012-10-21 23:05:35 +02006324 test -n "$PYTHON" && break
6325done
6326test -n "$PYTHON" || PYTHON="not-found"
6327
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006328if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006329 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6330else
6331 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006332fi
6333
6334
Kushal Das02d23a22014-04-15 23:50:06 +05306335for ac_prog in python$PACKAGE_VERSION python3 python
6336do
6337 # Extract the first word of "$ac_prog", so it can be a program name with args.
6338set dummy $ac_prog; ac_word=$2
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6340$as_echo_n "checking for $ac_word... " >&6; }
6341if ${ac_cv_prog_PYTHON+:} false; then :
6342 $as_echo_n "(cached) " >&6
6343else
6344 if test -n "$PYTHON"; then
6345 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6346else
6347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350 IFS=$as_save_IFS
6351 test -z "$as_dir" && as_dir=.
6352 for ac_exec_ext in '' $ac_executable_extensions; do
6353 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6354 ac_cv_prog_PYTHON="$ac_prog"
6355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356 break 2
6357 fi
6358done
6359 done
6360IFS=$as_save_IFS
6361
6362fi
6363fi
6364PYTHON=$ac_cv_prog_PYTHON
6365if test -n "$PYTHON"; then
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6367$as_echo "$PYTHON" >&6; }
6368else
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; }
6371fi
6372
6373
6374 test -n "$PYTHON" && break
6375done
6376test -n "$PYTHON" || PYTHON="not-found"
6377
6378if test "$PYTHON" = not-found; then
6379 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6380else
6381 OPCODEHGEN="$PYTHON"
6382fi
6383
6384
6385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386case $MACHDEP in
6387bsdos*|hp*|HP*)
6388 # install -d does not work on BSDI or HP-UX
6389 if test -z "$INSTALL"
6390 then
6391 INSTALL="${srcdir}/install-sh -c"
6392 fi
6393esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006394# Find a good install program. We prefer a C program (faster),
6395# so one script is as good as another. But avoid the broken or
6396# incompatible versions:
6397# SysV /etc/install, /usr/sbin/install
6398# SunOS /usr/etc/install
6399# IRIX /sbin/install
6400# AIX /bin/install
6401# AmigaOS /C/install, which installs bootblocks on floppy discs
6402# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6403# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6404# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6405# OS/2's system install, which has a completely different semantic
6406# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006407# Reject install programs that cannot install multiple files.
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6409$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006411if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006412 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413else
6414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6415for as_dir in $PATH
6416do
6417 IFS=$as_save_IFS
6418 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006419 # Account for people who put trailing slashes in PATH elements.
6420case $as_dir/ in #((
6421 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006423 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424 /usr/ucb/* ) ;;
6425 *)
6426 # OSF1 and SCO ODT 3.0 have their own names for install.
6427 # Don't use installbsd from OSF since it installs stuff as root
6428 # by default.
6429 for ac_prog in ginstall scoinst install; do
6430 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006431 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432 if test $ac_prog = install &&
6433 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6434 # AIX install. It has an incompatible calling convention.
6435 :
6436 elif test $ac_prog = install &&
6437 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6438 # program-specific install script used by HP pwplus--don't use.
6439 :
6440 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006441 rm -rf conftest.one conftest.two conftest.dir
6442 echo one > conftest.one
6443 echo two > conftest.two
6444 mkdir conftest.dir
6445 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6446 test -s conftest.one && test -s conftest.two &&
6447 test -s conftest.dir/conftest.one &&
6448 test -s conftest.dir/conftest.two
6449 then
6450 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6451 break 3
6452 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006453 fi
6454 fi
6455 done
6456 done
6457 ;;
6458esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006459
6460 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006461IFS=$as_save_IFS
6462
Matthias Kloseb9621712010-04-24 17:59:49 +00006463rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464
6465fi
6466 if test "${ac_cv_path_install+set}" = set; then
6467 INSTALL=$ac_cv_path_install
6468 else
6469 # As a last resort, use the slow shell script. Don't cache a
6470 # value for INSTALL within a source directory, because that will
6471 # break other packages using the cache if that directory is
6472 # removed, or if the value is a relative name.
6473 INSTALL=$ac_install_sh
6474 fi
6475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6477$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006478
6479# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6480# It thinks the first close brace ends the variable substitution.
6481test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6482
6483test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6484
6485test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6486
Matthias Klose93a0ef12012-03-15 18:08:34 +01006487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6488$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6489if test -z "$MKDIR_P"; then
6490 if ${ac_cv_path_mkdir+:} false; then :
6491 $as_echo_n "(cached) " >&6
6492else
6493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6495do
6496 IFS=$as_save_IFS
6497 test -z "$as_dir" && as_dir=.
6498 for ac_prog in mkdir gmkdir; do
6499 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006500 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006501 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6502 'mkdir (GNU coreutils) '* | \
6503 'mkdir (coreutils) '* | \
6504 'mkdir (fileutils) '4.1*)
6505 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6506 break 3;;
6507 esac
6508 done
6509 done
6510 done
6511IFS=$as_save_IFS
6512
6513fi
6514
6515 test -d ./--version && rmdir ./--version
6516 if test "${ac_cv_path_mkdir+set}" = set; then
6517 MKDIR_P="$ac_cv_path_mkdir -p"
6518 else
6519 # As a last resort, use the slow shell script. Don't cache a
6520 # value for MKDIR_P within a source directory, because that will
6521 # break other packages using the cache if that directory is
6522 # removed, or if the value is a relative name.
6523 MKDIR_P="$ac_install_sh -d"
6524 fi
6525fi
6526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6527$as_echo "$MKDIR_P" >&6; }
6528
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006529
6530# Not every filesystem supports hard links
6531
6532if test -z "$LN" ; then
6533 case $ac_sys_system in
6534 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535 *) LN=ln;;
6536 esac
6537fi
6538
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006539# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006540
6541ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006542
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6545$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006546
6547# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006548if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549 withval=$with_pydebug;
6550if test "$withval" != no
6551then
6552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6556$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006557 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006558 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006559else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6560$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006561fi
6562else
Matthias Kloseb9621712010-04-24 17:59:49 +00006563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565fi
6566
6567
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006568# Enable LTO flags
6569
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6571$as_echo_n "checking for --with-lto... " >&6; }
6572
6573# Check whether --with-lto was given.
6574if test "${with_lto+set}" = set; then :
6575 withval=$with_lto;
6576if test "$withval" != no
6577then
6578 Py_LTO='true'
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6580$as_echo "yes" >&6; };
6581else
6582 Py_LTO='false'
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; };
6585fi
6586else
6587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588$as_echo "no" >&6; }
6589fi
6590
6591if test "$Py_LTO" = 'true' ; then
6592 case $CC in
6593 *clang*)
6594 # Any changes made here should be reflected in the GCC+Darwin case below
6595 LTOFLAGS="-flto"
6596 ;;
6597 *gcc*)
6598 case $ac_sys_system in
6599 Darwin*)
6600 LTOFLAGS="-flto"
6601 ;;
6602 *)
6603 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6604 ;;
6605 esac
6606 ;;
6607 esac
6608fi
6609
Brett Cannon7188a3e2015-09-18 15:13:44 -07006610# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006611
6612
6613
6614
6615
6616
Brett Cannon7188a3e2015-09-18 15:13:44 -07006617# Extract the first word of "llvm-profdata", so it can be a program name with args.
6618set dummy llvm-profdata; ac_word=$2
6619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6620$as_echo_n "checking for $ac_word... " >&6; }
6621if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6622 $as_echo_n "(cached) " >&6
6623else
6624 if test -n "$LLVM_PROF_FOUND"; then
6625 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6626else
6627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6628for as_dir in $PATH
6629do
6630 IFS=$as_save_IFS
6631 test -z "$as_dir" && as_dir=.
6632 for ac_exec_ext in '' $ac_executable_extensions; do
6633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6634 ac_cv_prog_LLVM_PROF_FOUND="found"
6635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6636 break 2
6637 fi
6638done
6639 done
6640IFS=$as_save_IFS
6641
6642 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6643fi
6644fi
6645LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6646if test -n "$LLVM_PROF_FOUND"; then
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6648$as_echo "$LLVM_PROF_FOUND" >&6; }
6649else
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6651$as_echo "no" >&6; }
6652fi
6653
6654
6655LLVM_PROF_ERR=no
6656case $CC in
6657 *clang*)
6658 # Any changes made here should be reflected in the GCC+Darwin case below
6659 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6660 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6661 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6662 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6663 if test $LLVM_PROF_FOUND = not-found
6664 then
6665 LLVM_PROF_ERR=yes
6666 fi
6667 ;;
6668 *gcc*)
6669 case $ac_sys_system in
6670 Darwin*)
6671 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6672 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6673 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6674 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6675 if test $LLVM_PROF_FOUND = not-found
6676 then
6677 LLVM_PROF_ERR=yes
6678 fi
6679 ;;
6680 *)
6681 PGO_PROF_GEN_FLAG="-fprofile-generate"
6682 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6683 LLVM_PROF_MERGER="true"
6684 LLVM_PROF_FILE=""
6685 ;;
6686 esac
6687 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006688 *icc*)
6689 PGO_PROF_GEN_FLAG="-prof-gen"
6690 PGO_PROF_USE_FLAG="-prof-use"
6691 LLVM_PROF_MERGER="true"
6692 LLVM_PROF_FILE=""
6693 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006694esac
6695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6697# merged with this chunk of code?
6698
6699# Optimizer/debugger flags
6700# ------------------------
6701# (The following bit of code is complicated enough - please keep things
6702# indented properly. Just pretend you're editing Python code. ;-)
6703
6704# There are two parallel sets of case statements below, one that checks to
6705# see if OPT was set and one that does BASECFLAGS setting based upon
6706# compiler and platform. BASECFLAGS tweaks need to be made even if the
6707# user set OPT.
6708
6709# tweak OPT based on compiler and platform, only if the user didn't set
6710# it on the command line
6711
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006712if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713then
6714 case $GCC in
6715 yes)
6716 if test "$CC" != 'g++' ; then
6717 STRICT_PROTO="-Wstrict-prototypes"
6718 fi
6719 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6720 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6721 WRAP="-fwrapv"
6722 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006723
6724 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006725 case $CC in
6726 *clang*) WRAP="-fwrapv"
6727 ;;
6728 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730 case $ac_cv_prog_cc_g in
6731 yes)
6732 if test "$Py_DEBUG" = 'true' ; then
6733 # Optimization messes up debuggers, so turn it off for
6734 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006735 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6736 OPT="-g -Og -Wall $STRICT_PROTO"
6737 else
6738 OPT="-g -O0 -Wall $STRICT_PROTO"
6739 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740 else
6741 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6742 fi
6743 ;;
6744 *)
6745 OPT="-O3 -Wall $STRICT_PROTO"
6746 ;;
6747 esac
6748 case $ac_sys_system in
6749 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6750 ;;
6751 esac
6752 ;;
6753
6754 *)
6755 OPT="-O"
6756 ;;
6757 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758fi
6759
6760
6761
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763# The -arch flags for universal builds on OSX
6764UNIVERSAL_ARCH_FLAGS=
6765
6766
6767# tweak BASECFLAGS based on compiler and platform
6768case $GCC in
6769yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006770 # Python doesn't violate C99 aliasing rules, but older versions of
6771 # GCC produce warnings for legal Python code. Enable
6772 # -fno-strict-aliasing on versions of GCC that support but produce
6773 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6775$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776 ac_save_cc="$CC"
6777 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006778 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006779 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006781else
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006784
Matthias Kloseb159a552010-04-25 21:00:44 +00006785
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006786int
6787main ()
6788{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006789
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006790 ;
6791 return 0;
6792}
Matthias Kloseb159a552010-04-25 21:00:44 +00006793
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006795if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006796
6797 CC="$ac_save_cc -fstrict-aliasing"
6798 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006800/* end confdefs.h. */
6801
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006802 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006803int
6804main ()
6805{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006806double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006807 ;
6808 return 0;
6809}
Matthias Kloseb159a552010-04-25 21:00:44 +00006810
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006812if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006813
6814 ac_cv_no_strict_aliasing=no
6815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816else
Matthias Kloseb159a552010-04-25 21:00:44 +00006817
6818 ac_cv_no_strict_aliasing=yes
6819
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006820fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006822
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006823else
Matthias Kloseb159a552010-04-25 21:00:44 +00006824
6825 ac_cv_no_strict_aliasing=no
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006829fi
6830
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006831 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6834$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006835 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836 then
6837 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6838 fi
6839
Zachary Ware5af85642015-12-21 12:09:17 -06006840 # ICC doesn't recognize the option, but only emits a warning
6841 ## XXX does it emit an unused result warning and can it be disabled?
6842 case "$CC" in
6843 *icc*)
6844 ac_cv_disable_unused_result_warning=no
6845 ;;
6846 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6848$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6849 ac_save_cc="$CC"
6850 CC="$CC -Wunused-result -Werror"
6851 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006852 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006853 $as_echo_n "(cached) " >&6
6854else
6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6856/* end confdefs.h. */
6857
6858
6859int
6860main ()
6861{
6862
6863 ;
6864 return 0;
6865}
6866
6867_ACEOF
6868if ac_fn_c_try_compile "$LINENO"; then :
6869
6870 ac_cv_disable_unused_result_warning=yes
6871
6872else
6873
6874 ac_cv_disable_unused_result_warning=no
6875
6876fi
6877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6878fi
6879
6880 CFLAGS="$save_CFLAGS"
6881 CC="$ac_save_cc"
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6883$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006884 ;;
6885 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006886
6887 if test $ac_cv_disable_unused_result_warning = yes
6888 then
6889 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6890 fi
6891
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6893$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6894 ac_save_cc="$CC"
6895 CC="$CC -Werror=declaration-after-statement"
6896 save_CFLAGS="$CFLAGS"
6897 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6898 $as_echo_n "(cached) " >&6
6899else
6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6901/* end confdefs.h. */
6902
6903
6904int
6905main ()
6906{
6907
6908 ;
6909 return 0;
6910}
6911
6912_ACEOF
6913if ac_fn_c_try_compile "$LINENO"; then :
6914
6915 ac_cv_declaration_after_statement_warning=yes
6916
6917else
6918
6919 ac_cv_declaration_after_statement_warning=no
6920
6921fi
6922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6923fi
6924
6925 CFLAGS="$save_CFLAGS"
6926 CC="$ac_save_cc"
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6928$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6929
6930 if test $ac_cv_declaration_after_statement_warning = yes
6931 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006932 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006933 fi
6934
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6936$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6937 ac_save_cc="$CC"
6938 CC="$CC -Wsign-compare"
6939 save_CFLAGS="$CFLAGS"
6940 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6941 $as_echo_n "(cached) " >&6
6942else
6943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6944/* end confdefs.h. */
6945
6946
6947int
6948main ()
6949{
6950
6951 ;
6952 return 0;
6953}
6954
6955_ACEOF
6956if ac_fn_c_try_compile "$LINENO"; then :
6957
6958 ac_cv_enable_sign_compare_warning=yes
6959
6960else
6961
6962 ac_cv_enable_sign_compare_warning=no
6963
6964fi
6965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6966fi
6967
6968 CFLAGS="$save_CFLAGS"
6969 CC="$ac_save_cc"
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6971$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6972
6973 if test $ac_cv_enable_sign_compare_warning = yes
6974 then
6975 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6976 fi
6977
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6979$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6980 ac_save_cc="$CC"
6981 CC="$CC -Wunreachable-code"
6982 save_CFLAGS="$CFLAGS"
6983 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6984 $as_echo_n "(cached) " >&6
6985else
6986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6987/* end confdefs.h. */
6988
6989
6990int
6991main ()
6992{
6993
6994 ;
6995 return 0;
6996}
6997
6998_ACEOF
6999if ac_fn_c_try_compile "$LINENO"; then :
7000
7001 ac_cv_enable_unreachable_code_warning=yes
7002
7003else
7004
7005 ac_cv_enable_unreachable_code_warning=no
7006
7007fi
7008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7009fi
7010
7011 CFLAGS="$save_CFLAGS"
7012 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007013
7014 # Don't enable unreachable code warning in debug mode, since it usually
7015 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007016 # Issue #24324: Unfortunately, the unreachable code warning does not work
7017 # correctly on gcc and has been silently removed from the compiler.
7018 # It is supported on clang but on OS X systems gcc may be an alias
7019 # for clang. Try to determine if the compiler is not really gcc and,
7020 # if so, only then enable the warning.
7021 if test $ac_cv_enable_unreachable_code_warning = yes && \
7022 test "$Py_DEBUG" != "true" && \
7023 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007024 then
7025 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007026 else
7027 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007028 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7030$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007031
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007032 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7033 # support. Without this, treatment of subnormals doesn't follow
7034 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007035 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007036 alpha*)
7037 BASECFLAGS="$BASECFLAGS -mieee"
7038 ;;
7039 esac
7040
7041 case $ac_sys_system in
7042 SCO_SV*)
7043 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7044 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007045
7046 # is there any other compiler on Darwin besides gcc?
7047 Darwin*)
7048 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7049 # used to be here, but non-Apple gcc doesn't accept them.
7050 if test "${CC}" = gcc
7051 then
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007053$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007054 case "${UNIVERSALSDK}" in
7055 */MacOSX10.4u.sdk)
7056 # Build using 10.4 SDK, force usage of gcc when the
7057 # compiler is gcc, otherwise the user will get very
7058 # confusing error messages when building on OSX 10.6
7059 CC=gcc-4.0
7060 CPP=cpp-4.0
7061 ;;
7062 esac
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007064$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007065 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007066
Ned Deily87adb6e2013-10-18 21:09:56 -07007067 if test "${enable_universalsdk}"
7068 then
7069 case "$UNIVERSAL_ARCHS" in
7070 32-bit)
7071 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7072 LIPO_32BIT_FLAGS=""
7073 ARCH_RUN_32BIT=""
7074 ;;
7075 64-bit)
7076 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7077 LIPO_32BIT_FLAGS=""
7078 ARCH_RUN_32BIT="true"
7079 ;;
7080 all)
7081 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7082 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7083 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7084 ;;
7085 intel)
7086 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7087 LIPO_32BIT_FLAGS="-extract i386"
7088 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7089 ;;
7090 intel-32)
7091 UNIVERSAL_ARCH_FLAGS="-arch i386"
7092 LIPO_32BIT_FLAGS=""
7093 ARCH_RUN_32BIT=""
7094 ;;
7095 3-way)
7096 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7097 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7098 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7099 ;;
7100 *)
7101 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7102 ;;
7103 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007104
Ned Deily87adb6e2013-10-18 21:09:56 -07007105 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7106 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7107 if test "${UNIVERSALSDK}" != "/"
7108 then
7109 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7110 fi
7111 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007112
Ned Deily87adb6e2013-10-18 21:09:56 -07007113 # Calculate an appropriate deployment target for this build:
7114 # The deployment target value is used explicitly to enable certain
7115 # features are enabled (such as builtin libedit support for readline)
7116 # through the use of Apple's Availabiliy Macros and is used as a
7117 # component of the string returned by distutils.get_platform().
7118 #
7119 # Use the value from:
7120 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7121 # 2. the operating system version of the build machine if >= 10.6
7122 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7123 # below to pick either 10.3, 10.4, or 10.5 as the target.
7124 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007125
Ned Deily87adb6e2013-10-18 21:09:56 -07007126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7127$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007128 cur_target_major=`sw_vers -productVersion | \
7129 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7130 cur_target_minor=`sw_vers -productVersion | \
7131 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7132 cur_target="${cur_target_major}.${cur_target_minor}"
7133 if test ${cur_target_major} -eq 10 && \
7134 test ${cur_target_minor} -ge 3 && \
7135 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007136 then
Ned Deily36820b62014-06-25 13:44:22 -07007137 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007138 cur_target=10.3
7139 if test ${enable_universalsdk}
7140 then
7141 case "$UNIVERSAL_ARCHS" in
7142 all|3-way|intel|64-bit)
7143 # These configurations were first supported in 10.5
7144 cur_target='10.5'
7145 ;;
7146 esac
7147 else
7148 if test `/usr/bin/arch` = "i386"
7149 then
7150 # 10.4 was the first release to support Intel archs
7151 cur_target="10.4"
7152 fi
7153 fi
7154 fi
7155 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007156
Ned Deily87adb6e2013-10-18 21:09:56 -07007157 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7158 # environment with a value that is the same as what we'll use
7159 # in the Makefile to ensure that we'll get the same compiler
7160 # environment during configure and build time.
7161 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7162 export MACOSX_DEPLOYMENT_TARGET
7163 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7165$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007166
Ned Deily87adb6e2013-10-18 21:09:56 -07007167 # end of Darwin* tests
7168 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007169 esac
7170 ;;
7171
7172*)
7173 case $ac_sys_system in
7174 OpenUNIX*|UnixWare*)
7175 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7176 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007177 SCO_SV*)
7178 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7179 ;;
7180 esac
7181 ;;
7182esac
7183
Zachary Ware5af85642015-12-21 12:09:17 -06007184# ICC needs -fp-model strict or floats behave badly
7185case "$CC" in
7186*icc*)
7187 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7188 ;;
7189esac
7190
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007191if test "$Py_DEBUG" = 'true'; then
7192 :
7193else
7194 OPT="-DNDEBUG $OPT"
7195fi
7196
7197if test "$ac_arch_flags"
7198then
7199 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7200fi
7201
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007202# On some compilers, pthreads are available without further options
7203# (e.g. MacOS X). On some of these systems, the compiler will not
7204# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7205# So we have to see first whether pthreads are available without
7206# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7208$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007209if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007210 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007213 ac_cv_pthread_is_default=no
7214else
Matthias Kloseb9621712010-04-24 17:59:49 +00007215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007216/* end confdefs.h. */
7217
Stefan Krah7dba5942012-11-22 22:49:11 +01007218#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007219#include <pthread.h>
7220
7221void* routine(void* p){return NULL;}
7222
7223int main(){
7224 pthread_t p;
7225 if(pthread_create(&p,NULL,routine,NULL)!=0)
7226 return 1;
7227 (void)pthread_detach(p);
7228 return 0;
7229}
7230
7231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007232if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007233
7234 ac_cv_pthread_is_default=yes
7235 ac_cv_kthread=no
7236 ac_cv_pthread=no
7237
7238else
Matthias Kloseb9621712010-04-24 17:59:49 +00007239 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7242 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007243fi
7244
7245
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246fi
7247
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7249$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007250
7251
7252if test $ac_cv_pthread_is_default = yes
7253then
7254 ac_cv_kpthread=no
7255else
7256# -Kpthread, if available, provides the right #defines
7257# and linker options to make pthread_create available
7258# Some compilers won't report that they do not support -Kpthread,
7259# so we need to run a program to see whether it really made the
7260# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7262$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007263if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265else
7266 ac_save_cc="$CC"
7267CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007268if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269 ac_cv_kpthread=no
7270else
Matthias Kloseb9621712010-04-24 17:59:49 +00007271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007272/* end confdefs.h. */
7273
Stefan Krah7dba5942012-11-22 22:49:11 +01007274#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007275#include <pthread.h>
7276
7277void* routine(void* p){return NULL;}
7278
7279int main(){
7280 pthread_t p;
7281 if(pthread_create(&p,NULL,routine,NULL)!=0)
7282 return 1;
7283 (void)pthread_detach(p);
7284 return 0;
7285}
7286
7287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007288if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007289 ac_cv_kpthread=yes
7290else
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295fi
7296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007297CC="$ac_save_cc"
7298fi
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7301$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302fi
7303
7304if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7305then
7306# -Kthread, if available, provides the right #defines
7307# and linker options to make pthread_create available
7308# Some compilers won't report that they do not support -Kthread,
7309# so we need to run a program to see whether it really made the
7310# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7312$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007313if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007314 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315else
7316 ac_save_cc="$CC"
7317CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007318if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319 ac_cv_kthread=no
7320else
Matthias Kloseb9621712010-04-24 17:59:49 +00007321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322/* end confdefs.h. */
7323
Stefan Krah7dba5942012-11-22 22:49:11 +01007324#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007325#include <pthread.h>
7326
7327void* routine(void* p){return NULL;}
7328
7329int main(){
7330 pthread_t p;
7331 if(pthread_create(&p,NULL,routine,NULL)!=0)
7332 return 1;
7333 (void)pthread_detach(p);
7334 return 0;
7335}
7336
7337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007338if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339 ac_cv_kthread=yes
7340else
Matthias Kloseb9621712010-04-24 17:59:49 +00007341 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7344 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345fi
7346
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007347CC="$ac_save_cc"
7348fi
7349
Matthias Kloseb9621712010-04-24 17:59:49 +00007350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7351$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007352fi
7353
7354if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7355then
7356# -pthread, if available, provides the right #defines
7357# and linker options to make pthread_create available
7358# Some compilers won't report that they do not support -pthread,
7359# so we need to run a program to see whether it really made the
7360# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7362$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007363if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365else
7366 ac_save_cc="$CC"
7367CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007368if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007369 ac_cv_pthread=no
7370else
Matthias Kloseb9621712010-04-24 17:59:49 +00007371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372/* end confdefs.h. */
7373
Stefan Krah7dba5942012-11-22 22:49:11 +01007374#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375#include <pthread.h>
7376
7377void* routine(void* p){return NULL;}
7378
7379int main(){
7380 pthread_t p;
7381 if(pthread_create(&p,NULL,routine,NULL)!=0)
7382 return 1;
7383 (void)pthread_detach(p);
7384 return 0;
7385}
7386
7387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007388if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007389 ac_cv_pthread=yes
7390else
Matthias Kloseb9621712010-04-24 17:59:49 +00007391 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7394 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395fi
7396
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397CC="$ac_save_cc"
7398fi
7399
Matthias Kloseb9621712010-04-24 17:59:49 +00007400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7401$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402fi
7403
7404# If we have set a CC compiler flag for thread support then
7405# check if it works for CXX, too.
7406ac_cv_cxx_thread=no
7407if test ! -z "$CXX"
7408then
Matthias Kloseb9621712010-04-24 17:59:49 +00007409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7410$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411ac_save_cxx="$CXX"
7412
7413if test "$ac_cv_kpthread" = "yes"
7414then
7415 CXX="$CXX -Kpthread"
7416 ac_cv_cxx_thread=yes
7417elif test "$ac_cv_kthread" = "yes"
7418then
7419 CXX="$CXX -Kthread"
7420 ac_cv_cxx_thread=yes
7421elif test "$ac_cv_pthread" = "yes"
7422then
7423 CXX="$CXX -pthread"
7424 ac_cv_cxx_thread=yes
7425fi
7426
7427if test $ac_cv_cxx_thread = yes
7428then
7429 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7430 $CXX -c conftest.$ac_ext 2>&5
7431 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7432 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7433 then
7434 ac_cv_cxx_thread=yes
7435 else
7436 ac_cv_cxx_thread=no
7437 fi
7438 rm -fr conftest*
7439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7441$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442fi
7443CXX="$ac_save_cxx"
7444
7445
7446# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7448$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007449if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007450 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451else
Matthias Kloseb9621712010-04-24 17:59:49 +00007452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453/* end confdefs.h. */
7454#include <stdlib.h>
7455#include <stdarg.h>
7456#include <string.h>
7457#include <float.h>
7458
7459int
7460main ()
7461{
7462
7463 ;
7464 return 0;
7465}
7466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007467if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468 ac_cv_header_stdc=yes
7469else
Matthias Kloseb9621712010-04-24 17:59:49 +00007470 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7473
7474if test $ac_cv_header_stdc = yes; then
7475 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477/* end confdefs.h. */
7478#include <string.h>
7479
7480_ACEOF
7481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007482 $EGREP "memchr" >/dev/null 2>&1; then :
7483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484else
7485 ac_cv_header_stdc=no
7486fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007487rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488
7489fi
7490
7491if test $ac_cv_header_stdc = yes; then
7492 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494/* end confdefs.h. */
7495#include <stdlib.h>
7496
7497_ACEOF
7498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007499 $EGREP "free" >/dev/null 2>&1; then :
7500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501else
7502 ac_cv_header_stdc=no
7503fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007504rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505
7506fi
7507
7508if test $ac_cv_header_stdc = yes; then
7509 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007510 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511 :
7512else
Matthias Kloseb9621712010-04-24 17:59:49 +00007513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514/* end confdefs.h. */
7515#include <ctype.h>
7516#include <stdlib.h>
7517#if ((' ' & 0x0FF) == 0x020)
7518# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7519# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7520#else
7521# define ISLOWER(c) \
7522 (('a' <= (c) && (c) <= 'i') \
7523 || ('j' <= (c) && (c) <= 'r') \
7524 || ('s' <= (c) && (c) <= 'z'))
7525# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7526#endif
7527
7528#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7529int
7530main ()
7531{
7532 int i;
7533 for (i = 0; i < 256; i++)
7534 if (XOR (islower (i), ISLOWER (i))
7535 || toupper (i) != TOUPPER (i))
7536 return 2;
7537 return 0;
7538}
7539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007540if ac_fn_c_try_run "$LINENO"; then :
7541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542else
Matthias Kloseb9621712010-04-24 17:59:49 +00007543 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547fi
7548
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549fi
7550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7552$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553if test $ac_cv_header_stdc = yes; then
7554
Matthias Kloseb9621712010-04-24 17:59:49 +00007555$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556
7557fi
7558
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007559for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007560fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007561ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007562sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007563unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007564poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007565sys/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 +01007566sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007567sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007568sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007569sys/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 -07007570libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007571bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7572sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007573do :
7574 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7575ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007576if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007577 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007578#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007579_ACEOF
7580
7581fi
7582
Guido van Rossum627b2d71993-12-24 10:39:16 +00007583done
7584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007585ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007586for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7589$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007590if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007592else
Matthias Kloseb9621712010-04-24 17:59:49 +00007593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007594/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007595#include <sys/types.h>
7596#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007597
Martin v. Löwis11437992002-04-12 09:54:03 +00007598int
7599main ()
7600{
7601if ((DIR *) 0)
7602return 0;
7603 ;
7604 return 0;
7605}
7606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007607if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007608 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007614eval ac_res=\$$as_ac_Header
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7616$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007617if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007619#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007620_ACEOF
7621
7622ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007623fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007624
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007625done
7626# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7627if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7629$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007630if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007632else
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637/* Override any GCC internal prototype to avoid an error.
7638 Use char because int might match the return type of a GCC
7639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007640#ifdef __cplusplus
7641extern "C"
7642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007643char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007644int
7645main ()
7646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007647return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007648 ;
7649 return 0;
7650}
7651_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007652for ac_lib in '' dir; do
7653 if test -z "$ac_lib"; then
7654 ac_res="none required"
7655 else
7656 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007657 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007658 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662rm -f core conftest.err conftest.$ac_objext \
7663 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007664 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667done
Victor Stinnere0be4232011-10-25 13:06:09 +02007668if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670else
7671 ac_cv_search_opendir=no
7672fi
7673rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007674LIBS=$ac_func_search_save_LIBS
7675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7677$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007679if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007681
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007682fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007683
Michael W. Hudson54241132001-12-07 15:38:26 +00007684else
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7686$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007687if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007689else
7690 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007694/* Override any GCC internal prototype to avoid an error.
7695 Use char because int might match the return type of a GCC
7696 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007697#ifdef __cplusplus
7698extern "C"
7699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007700char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007701int
7702main ()
7703{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 ;
7706 return 0;
7707}
7708_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709for ac_lib in '' x; do
7710 if test -z "$ac_lib"; then
7711 ac_res="none required"
7712 else
7713 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007714 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719rm -f core conftest.err conftest.$ac_objext \
7720 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007721 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007724done
Victor Stinnere0be4232011-10-25 13:06:09 +02007725if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727else
7728 ac_cv_search_opendir=no
7729fi
7730rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007731LIBS=$ac_func_search_save_LIBS
7732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7734$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007736if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007738
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007739fi
7740
7741fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007742
Matthias Kloseb9621712010-04-24 17:59:49 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7744$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007745if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007747else
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007749/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007750#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007751int
7752main ()
7753{
7754return makedev(0, 0);
7755 ;
7756 return 0;
7757}
7758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007760 ac_cv_header_sys_types_h_makedev=yes
7761else
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764rm -f core conftest.err conftest.$ac_objext \
7765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007766
7767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7769$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007770
7771if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007772ac_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 +02007773if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007774
Matthias Kloseb9621712010-04-24 17:59:49 +00007775$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007776
7777fi
7778
7779
7780
7781 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 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 +02007783if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007784
Matthias Kloseb9621712010-04-24 17:59:49 +00007785$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007786
7787fi
7788
7789
7790 fi
7791fi
7792
Michael W. Hudson54241132001-12-07 15:38:26 +00007793
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007794# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7795for ac_header in net/if.h
7796do :
7797 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7798#ifdef STDC_HEADERS
7799# include <stdlib.h>
7800# include <stddef.h>
7801#else
7802# ifdef HAVE_STDLIB_H
7803# include <stdlib.h>
7804# endif
7805#endif
7806#ifdef HAVE_SYS_SOCKET_H
7807# include <sys/socket.h>
7808#endif
7809
7810"
Victor Stinnere0be4232011-10-25 13:06:09 +02007811if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007812 cat >>confdefs.h <<_ACEOF
7813#define HAVE_NET_IF_H 1
7814_ACEOF
7815
7816fi
7817
7818done
7819
7820
Martin v. Löwis11017b12006-01-14 18:12:57 +00007821# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007822for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007823do :
7824 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 +00007825#ifdef HAVE_ASM_TYPES_H
7826#include <asm/types.h>
7827#endif
7828#ifdef HAVE_SYS_SOCKET_H
7829#include <sys/socket.h>
7830#endif
7831
Matthias Kloseb9621712010-04-24 17:59:49 +00007832"
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007834 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007835#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007836_ACEOF
7837
7838fi
7839
7840done
7841
7842
Charles-François Natali47413c12011-10-06 19:47:44 +02007843# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007844for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007845do :
7846 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7847ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7848#ifdef HAVE_SYS_SOCKET_H
7849#include <sys/socket.h>
7850#endif
7851
7852"
7853if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7854 cat >>confdefs.h <<_ACEOF
7855#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7856_ACEOF
7857
7858fi
7859
7860done
7861
7862
Guido van Rossum627b2d71993-12-24 10:39:16 +00007863# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007864was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7866$as_echo_n "checking for clock_t in time.h... " >&6; }
7867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007868/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007869#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
7871_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007874 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007875else
Martin v. Löwis11437992002-04-12 09:54:03 +00007876
7877
Matthias Kloseb9621712010-04-24 17:59:49 +00007878$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007879
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007880
Guido van Rossum627b2d71993-12-24 10:39:16 +00007881fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007882rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007883
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7885$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007886
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7888$as_echo_n "checking for makedev... " >&6; }
7889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007891
Jesus Cea740f53a2010-04-28 11:35:30 +00007892#if defined(MAJOR_IN_MKDEV)
7893#include <sys/mkdev.h>
7894#elif defined(MAJOR_IN_SYSMACROS)
7895#include <sys/sysmacros.h>
7896#else
7897#include <sys/types.h>
7898#endif
7899
Neal Norwitz11690112002-07-30 01:08:28 +00007900int
7901main ()
7902{
Jesus Cea740f53a2010-04-28 11:35:30 +00007903
7904 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007905 ;
7906 return 0;
7907}
Matthias Kloseb159a552010-04-25 21:00:44 +00007908
Neal Norwitz11690112002-07-30 01:08:28 +00007909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007910if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007911 ac_cv_has_makedev=yes
7912else
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915rm -f core conftest.err conftest.$ac_objext \
7916 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7918$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007919if test "$ac_cv_has_makedev" = "yes"; then
7920
Matthias Kloseb9621712010-04-24 17:59:49 +00007921$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007922
7923fi
7924
Christian Heimes985ecdc2013-11-20 11:46:18 +01007925# byte swapping
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7927$as_echo_n "checking for le64toh... " >&6; }
7928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7929/* end confdefs.h. */
7930
7931#ifdef HAVE_ENDIAN_H
7932#include <endian.h>
7933#elif defined(HAVE_SYS_ENDIAN_H)
7934#include <sys/endian.h>
7935#endif
7936
7937int
7938main ()
7939{
7940
7941 le64toh(1)
7942 ;
7943 return 0;
7944}
7945
7946_ACEOF
7947if ac_fn_c_try_link "$LINENO"; then :
7948 ac_cv_has_le64toh=yes
7949else
7950 ac_cv_has_le64toh=no
7951fi
7952rm -f core conftest.err conftest.$ac_objext \
7953 conftest$ac_exeext conftest.$ac_ext
7954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7955$as_echo "$ac_cv_has_le64toh" >&6; }
7956if test "$ac_cv_has_le64toh" = "yes"; then
7957
7958$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7959
7960fi
7961
Martin v. Löwis399a6892002-10-04 10:22:02 +00007962# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7963# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7964# defined, but the compiler does not support pragma redefine_extname,
7965# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7966# structures (such as rlimit64) without declaring them. As a
7967# work-around, disable LFS on such configurations
7968
7969use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7971$as_echo_n "checking Solaris LFS bug... " >&6; }
7972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007973/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007974
7975#define _LARGEFILE_SOURCE 1
7976#define _FILE_OFFSET_BITS 64
7977#include <sys/resource.h>
7978
Martin v. Löwis399a6892002-10-04 10:22:02 +00007979int
7980main ()
7981{
7982struct rlimit foo;
7983 ;
7984 return 0;
7985}
7986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007988 sol_lfs_bug=no
7989else
Matthias Kloseb9621712010-04-24 17:59:49 +00007990 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7994$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007995if test "$sol_lfs_bug" = "yes"; then
7996 use_lfs=no
7997fi
7998
7999if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008000# Two defines needed to enable largefile support on various platforms
8001# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008002case $ac_sys_system/$ac_sys_release in
8003AIX*)
8004
8005$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8006
8007 ;;
8008esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008009
Matthias Kloseb9621712010-04-24 17:59:49 +00008010$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008011
8012
Matthias Kloseb9621712010-04-24 17:59:49 +00008013$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008014
Martin v. Löwis399a6892002-10-04 10:22:02 +00008015fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008016
Guido van Rossum84e7b241996-08-19 21:59:00 +00008017# Add some code to confdefs.h so that the test for off_t works on SCO
8018cat >> confdefs.h <<\EOF
8019#if defined(SCO_DS)
8020#undef _OFF_T
8021#endif
8022EOF
8023
Guido van Rossumef2255b2000-03-10 22:30:29 +00008024# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008025ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008026if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008027
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008028else
Martin v. Löwis11437992002-04-12 09:54:03 +00008029
8030cat >>confdefs.h <<_ACEOF
8031#define mode_t int
8032_ACEOF
8033
8034fi
8035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008037if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008039else
Martin v. Löwis11437992002-04-12 09:54:03 +00008040
8041cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008043_ACEOF
8044
8045fi
8046
Matthias Kloseb9621712010-04-24 17:59:49 +00008047ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008048if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008050else
Martin v. Löwis11437992002-04-12 09:54:03 +00008051
8052cat >>confdefs.h <<_ACEOF
8053#define pid_t int
8054_ACEOF
8055
8056fi
8057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008058
Martin v. Löwis11437992002-04-12 09:54:03 +00008059cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008060#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008061_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008062
Matthias Kloseb9621712010-04-24 17:59:49 +00008063ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008064if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008066else
Martin v. Löwis11437992002-04-12 09:54:03 +00008067
8068cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008070_ACEOF
8071
8072fi
8073
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8075$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008076if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008080/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008081#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008082
8083_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008086 ac_cv_type_uid_t=yes
8087else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088 ac_cv_type_uid_t=no
8089fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008090rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8094$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008095if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008096
Matthias Kloseb9621712010-04-24 17:59:49 +00008097$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008098
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008101
8102fi
8103
Mark Dickinson983bc162012-12-02 12:11:38 +00008104
8105# There are two separate checks for each of the exact-width integer types we
8106# need. First we check whether the type is available using the usual
8107# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8108# and <stdint.h> where available). We then also use the special type checks of
8109# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8110# directly, #define's uint32_t to be a suitable type.
8111
8112ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8113if test "x$ac_cv_type_uint32_t" = xyes; then :
8114
8115$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8116
8117fi
8118
Matthias Kloseb9621712010-04-24 17:59:49 +00008119ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8120case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008121 no|yes) ;; #(
8122 *)
8123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008125
8126
8127cat >>confdefs.h <<_ACEOF
8128#define uint32_t $ac_cv_c_uint32_t
8129_ACEOF
8130;;
8131 esac
8132
Mark Dickinson983bc162012-12-02 12:11:38 +00008133
8134ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8135if test "x$ac_cv_type_uint64_t" = xyes; then :
8136
8137$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8138
8139fi
8140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8142case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008143 no|yes) ;; #(
8144 *)
8145
Matthias Kloseb9621712010-04-24 17:59:49 +00008146$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008147
8148
8149cat >>confdefs.h <<_ACEOF
8150#define uint64_t $ac_cv_c_uint64_t
8151_ACEOF
8152;;
8153 esac
8154
Mark Dickinson983bc162012-12-02 12:11:38 +00008155
8156ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8157if test "x$ac_cv_type_int32_t" = xyes; then :
8158
8159$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8160
8161fi
8162
Matthias Kloseb9621712010-04-24 17:59:49 +00008163ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8164case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008165 no|yes) ;; #(
8166 *)
8167
8168cat >>confdefs.h <<_ACEOF
8169#define int32_t $ac_cv_c_int32_t
8170_ACEOF
8171;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008172esac
8173
Mark Dickinson983bc162012-12-02 12:11:38 +00008174
8175ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8176if test "x$ac_cv_type_int64_t" = xyes; then :
8177
8178$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8179
8180fi
8181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8183case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008184 no|yes) ;; #(
8185 *)
8186
8187cat >>confdefs.h <<_ACEOF
8188#define int64_t $ac_cv_c_int64_t
8189_ACEOF
8190;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008191esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008192
Mark Dickinson983bc162012-12-02 12:11:38 +00008193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008195if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196
Matthias Kloseb9621712010-04-24 17:59:49 +00008197$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008198
8199fi
8200
Stefan Krah1919b7e2012-03-21 18:25:23 +01008201ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8202if test "x$ac_cv_type___uint128_t" = xyes; then :
8203
8204$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8205
8206fi
8207
Jack Jansendd19cf82001-12-06 22:36:17 +00008208
Michael W. Hudson54241132001-12-07 15:38:26 +00008209# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008210# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211# The cast to long int works around a bug in the HP C Compiler
8212# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8213# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8214# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8216$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008217if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008219else
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 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 +00008221
Martin v. Löwis11437992002-04-12 09:54:03 +00008222else
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 if test "$ac_cv_type_int" = yes; then
8224 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008226as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008227See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228 else
8229 ac_cv_sizeof_int=0
8230 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008232
Martin v. Löwis11437992002-04-12 09:54:03 +00008233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8235$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236
8237
8238
Martin v. Löwis11437992002-04-12 09:54:03 +00008239cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008240#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008241_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008242
8243
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244# The cast to long int works around a bug in the HP C Compiler
8245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8247# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8249$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008250if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008251 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008252else
Matthias Kloseb9621712010-04-24 17:59:49 +00008253 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 +00008254
Martin v. Löwis11437992002-04-12 09:54:03 +00008255else
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 if test "$ac_cv_type_long" = yes; then
8257 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8258$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008259as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008260See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 else
8262 ac_cv_sizeof_long=0
8263 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008265
Martin v. Löwis11437992002-04-12 09:54:03 +00008266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8268$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269
8270
8271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008273#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008274_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008275
8276
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277# The cast to long int works around a bug in the HP C Compiler
8278# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8279# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8280# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8282$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008283if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008284 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008285else
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 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 +00008287
Martin v. Löwis11437992002-04-12 09:54:03 +00008288else
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 if test "$ac_cv_type_void_p" = yes; then
8290 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008292as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008293See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008294 else
8295 ac_cv_sizeof_void_p=0
8296 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008298
Martin v. Löwis11437992002-04-12 09:54:03 +00008299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8301$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302
8303
8304
Martin v. Löwis11437992002-04-12 09:54:03 +00008305cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008306#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008307_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008308
8309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310# The cast to long int works around a bug in the HP C Compiler
8311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8313# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8315$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008316if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008318else
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 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 +00008320
Martin v. Löwis11437992002-04-12 09:54:03 +00008321else
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 if test "$ac_cv_type_short" = yes; then
8323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8324$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008325as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008326See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008327 else
8328 ac_cv_sizeof_short=0
8329 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008331
Martin v. Löwis11437992002-04-12 09:54:03 +00008332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8334$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008335
8336
8337
Martin v. Löwis11437992002-04-12 09:54:03 +00008338cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008339#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008340_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008341
8342
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343# The cast to long int works around a bug in the HP C Compiler
8344# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8345# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8346# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8348$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008349if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008351else
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 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 +00008353
Martin v. Löwis11437992002-04-12 09:54:03 +00008354else
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 if test "$ac_cv_type_float" = yes; then
8356 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008358as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008359See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360 else
8361 ac_cv_sizeof_float=0
8362 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008364
Martin v. Löwis11437992002-04-12 09:54:03 +00008365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8367$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368
8369
8370
Martin v. Löwis11437992002-04-12 09:54:03 +00008371cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008372#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008373_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008374
8375
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376# The cast to long int works around a bug in the HP C Compiler
8377# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8378# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8379# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8381$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008382if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008384else
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 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 +00008386
Martin v. Löwis11437992002-04-12 09:54:03 +00008387else
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 if test "$ac_cv_type_double" = yes; then
8389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008391as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008392See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393 else
8394 ac_cv_sizeof_double=0
8395 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008397
Martin v. Löwis11437992002-04-12 09:54:03 +00008398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8400$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401
8402
8403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008405#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008406_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008407
8408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409# The cast to long int works around a bug in the HP C Compiler
8410# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8411# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8412# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8414$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008415if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008417else
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 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 +00008419
Martin v. Löwis11437992002-04-12 09:54:03 +00008420else
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 if test "$ac_cv_type_fpos_t" = yes; then
8422 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8423$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008424as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008425See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426 else
8427 ac_cv_sizeof_fpos_t=0
8428 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008430
Martin v. Löwis11437992002-04-12 09:54:03 +00008431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8433$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434
8435
8436
Martin v. Löwis11437992002-04-12 09:54:03 +00008437cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008438#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008439_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008440
Michael W. Hudson54241132001-12-07 15:38:26 +00008441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442# The cast to long int works around a bug in the HP C Compiler
8443# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8444# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8445# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8447$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008450else
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 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 +00008452
Martin v. Löwis18e16552006-02-15 17:27:45 +00008453else
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 if test "$ac_cv_type_size_t" = yes; then
8455 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8456$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008457as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008458See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459 else
8460 ac_cv_sizeof_size_t=0
8461 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008463
Martin v. Löwis18e16552006-02-15 17:27:45 +00008464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8466$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467
8468
8469
Martin v. Löwis18e16552006-02-15 17:27:45 +00008470cat >>confdefs.h <<_ACEOF
8471#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8472_ACEOF
8473
8474
Christian Heimes400adb02008-02-01 08:12:03 +00008475# The cast to long int works around a bug in the HP C Compiler
8476# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8477# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8478# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8480$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008481if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008483else
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 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 +00008485
Christian Heimes400adb02008-02-01 08:12:03 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 if test "$ac_cv_type_pid_t" = yes; then
8488 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008490as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008491See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008492 else
8493 ac_cv_sizeof_pid_t=0
8494 fi
8495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496
Christian Heimes400adb02008-02-01 08:12:03 +00008497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8499$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008500
8501
8502
8503cat >>confdefs.h <<_ACEOF
8504#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8505_ACEOF
8506
8507
Michael W. Hudson54241132001-12-07 15:38:26 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8510$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008511have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008513/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515int
8516main ()
8517{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008518long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ;
8520 return 0;
8521}
8522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008524
8525
Matthias Kloseb9621712010-04-24 17:59:49 +00008526$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008527
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008528 have_long_long=yes
8529
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8533$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008534if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535# The cast to long int works around a bug in the HP C Compiler
8536# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8537# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8538# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8540$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008541if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008543else
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 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 +00008545
Martin v. Löwis11437992002-04-12 09:54:03 +00008546else
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 if test "$ac_cv_type_long_long" = yes; then
8548 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008550as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008551See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552 else
8553 ac_cv_sizeof_long_long=0
8554 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8559$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560
8561
8562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008564#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008565_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008566
Michael W. Hudson54241132001-12-07 15:38:26 +00008567
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008568fi
8569
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8571$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008572have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008574/* end confdefs.h. */
8575
8576int
8577main ()
8578{
8579long double x; x = (long double)0;
8580 ;
8581 return 0;
8582}
8583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008584if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008585
8586
Matthias Kloseb9621712010-04-24 17:59:49 +00008587$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008588
8589 have_long_double=yes
8590
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008591fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8594$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008595if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008596# The cast to long int works around a bug in the HP C Compiler
8597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8601$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008602if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 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 +00008606
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008607else
Matthias Kloseb9621712010-04-24 17:59:49 +00008608 if test "$ac_cv_type_long_double" = yes; then
8609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008611as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008612See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008613 else
8614 ac_cv_sizeof_long_double=0
8615 fi
8616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8620$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008621
8622
8623
8624cat >>confdefs.h <<_ACEOF
8625#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8626_ACEOF
8627
8628
8629fi
8630
8631
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8633$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008634have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008636/* end confdefs.h. */
8637
8638int
8639main ()
8640{
8641_Bool x; x = (_Bool)0;
8642 ;
8643 return 0;
8644}
8645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008646if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008647
8648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008650
8651 have_c99_bool=yes
8652
Thomas Woutersb2137042007-02-01 18:02:27 +00008653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8656$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008657if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658# The cast to long int works around a bug in the HP C Compiler
8659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8661# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8663$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008664if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 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 +00008668
Thomas Woutersb2137042007-02-01 18:02:27 +00008669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 if test "$ac_cv_type__Bool" = yes; then
8671 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008673as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008674See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 else
8676 ac_cv_sizeof__Bool=0
8677 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679
Thomas Woutersb2137042007-02-01 18:02:27 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8682$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683
8684
8685
Thomas Woutersb2137042007-02-01 18:02:27 +00008686cat >>confdefs.h <<_ACEOF
8687#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8688_ACEOF
8689
8690
8691fi
8692
Matthias Kloseb9621712010-04-24 17:59:49 +00008693ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008694 #include <stdint.h>
8695 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008696 #ifdef HAVE_INTTYPES_H
8697 #include <inttypes.h>
8698 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008699"
Victor Stinnere0be4232011-10-25 13:06:09 +02008700if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008701
8702cat >>confdefs.h <<_ACEOF
8703#define HAVE_UINTPTR_T 1
8704_ACEOF
8705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706# The cast to long int works around a bug in the HP C Compiler
8707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8709# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8711$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008712if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 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 +00008716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_uintptr_t" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723 else
8724 ac_cv_sizeof_uintptr_t=0
8725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8730$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731
8732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008735#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008737
Michael W. Hudson54241132001-12-07 15:38:26 +00008738
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008739fi
8740
Thomas Wouters89f507f2006-12-13 04:49:30 +00008741
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008742# The cast to long int works around a bug in the HP C Compiler
8743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8745# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8747$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008748if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008752#ifdef HAVE_SYS_TYPES_H
8753#include <sys/types.h>
8754#endif
8755
Matthias Kloseb9621712010-04-24 17:59:49 +00008756"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 if test "$ac_cv_type_off_t" = yes; then
8760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008762as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008763See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764 else
8765 ac_cv_sizeof_off_t=0
8766 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008768
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8771$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008772
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008773
8774
Martin v. Löwis11437992002-04-12 09:54:03 +00008775cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008776#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008777_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008778
Michael W. Hudson54241132001-12-07 15:38:26 +00008779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8782$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008783if test "$have_long_long" = yes
8784then
8785if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008786 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008787
Matthias Kloseb9621712010-04-24 17:59:49 +00008788$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008789
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8791$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008792else
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008795fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008796else
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8798$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008799fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008800
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008801# The cast to long int works around a bug in the HP C Compiler
8802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8804# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8806$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008807if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008811#ifdef HAVE_SYS_TYPES_H
8812#include <sys/types.h>
8813#endif
8814#ifdef HAVE_TIME_H
8815#include <time.h>
8816#endif
8817
Matthias Kloseb9621712010-04-24 17:59:49 +00008818"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008819
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008820else
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 if test "$ac_cv_type_time_t" = yes; then
8822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008824as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008825See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008826 else
8827 ac_cv_sizeof_time_t=0
8828 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8833$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008834
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835
8836
Martin v. Löwis11437992002-04-12 09:54:03 +00008837cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008838#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008839_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008840
Michael W. Hudson54241132001-12-07 15:38:26 +00008841
8842
Trent Mick635f6fb2000-08-23 21:33:05 +00008843# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008844ac_save_cc="$CC"
8845if test "$ac_cv_kpthread" = "yes"
8846then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008847elif test "$ac_cv_kthread" = "yes"
8848then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008849elif test "$ac_cv_pthread" = "yes"
8850then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008851fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852
Matthias Kloseb9621712010-04-24 17:59:49 +00008853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8854$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008855have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008857/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008858
8859 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008860int
8861main ()
8862{
Guido van Rossum12580492000-09-24 16:47:19 +00008863pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 ;
8865 return 0;
8866}
Matthias Kloseb159a552010-04-25 21:00:44 +00008867
Martin v. Löwis11437992002-04-12 09:54:03 +00008868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008869if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008870 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8874$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008875if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8879# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8881$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008882if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008884else
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008886#ifdef HAVE_PTHREAD_H
8887#include <pthread.h>
8888#endif
8889
Matthias Kloseb9621712010-04-24 17:59:49 +00008890"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892else
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 if test "$ac_cv_type_pthread_t" = yes; then
8894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008896as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008897See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008898 else
8899 ac_cv_sizeof_pthread_t=0
8900 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008902
Trent Mick635f6fb2000-08-23 21:33:05 +00008903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8905$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008906
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008907
8908
Martin v. Löwis11437992002-04-12 09:54:03 +00008909cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008910#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008911_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008912
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008913
Trent Mick635f6fb2000-08-23 21:33:05 +00008914fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008915CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008916
Michael W. Hudson54241132001-12-07 15:38:26 +00008917
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008918case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008919 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008920 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8921 ;;
8922 Darwin/*)
8923 OTHER_LIBTOOL_OPT=""
8924 ;;
8925esac
8926
8927
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008928
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008929case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008930 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008931 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8932 if test "${enable_universalsdk}"; then
8933 :
8934 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008935 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008936 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008937 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008938 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008939 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008940 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008941 if test ${gcc_version} '<' 4.0
8942 then
8943 LIBTOOL_CRUFT="-lcc_dynamic"
8944 else
8945 LIBTOOL_CRUFT=""
8946 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008948 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008949else
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008951/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008952
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008953 #include <unistd.h>
8954 int main(int argc, char*argv[])
8955 {
8956 if (sizeof(long) == 4) {
8957 return 0;
8958 } else {
8959 return 1;
8960 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008961 }
8962
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008964if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008965 ac_osx_32bit=yes
8966else
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8970 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008971fi
8972
8973
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008974 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008975 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008976 i386)
8977 MACOSX_DEFAULT_ARCH="i386"
8978 ;;
8979 ppc)
8980 MACOSX_DEFAULT_ARCH="ppc"
8981 ;;
8982 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008983 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008984 ;;
8985 esac
8986 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008987 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008988 i386)
8989 MACOSX_DEFAULT_ARCH="x86_64"
8990 ;;
8991 ppc)
8992 MACOSX_DEFAULT_ARCH="ppc64"
8993 ;;
8994 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008995 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008996 ;;
8997 esac
8998
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008999 fi
9000
9001 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009002 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009003 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009004esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9006$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009007if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009008then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009009 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009011 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009012
Matthias Kloseb9621712010-04-24 17:59:49 +00009013$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009014
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9016$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009017 if test $enable_shared = "yes"
9018 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009019 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 +00009020 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009021else
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009024fi
9025
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9027$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009028case $ac_sys_system/$ac_sys_release in
9029 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009030
Matthias Kloseb9621712010-04-24 17:59:49 +00009031$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009032
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9034$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009035 ;;
9036 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9038$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009039 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009040esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009041
Guido van Rossum0a516c91994-09-12 10:58:40 +00009042# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009043
Michael W. Hudson54241132001-12-07 15:38:26 +00009044
9045
9046
9047
Benjamin Peterson99f03762010-04-11 22:15:28 +00009048
Thomas Wouters477c8d52006-05-27 19:21:47 +00009049
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009050# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9051# -- usually .so, .sl on HP-UX, .dll on Cygwin
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9053$as_echo_n "checking the extension of shared libraries... " >&6; }
9054if test -z "$SHLIB_SUFFIX"; then
9055 case $ac_sys_system in
9056 hp*|HP*)
9057 case `uname -m` in
9058 ia64) SHLIB_SUFFIX=.so;;
9059 *) SHLIB_SUFFIX=.sl;;
9060 esac
9061 ;;
9062 CYGWIN*) SHLIB_SUFFIX=.dll;;
9063 *) SHLIB_SUFFIX=.so;;
9064 esac
9065fi
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9067$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009068
Guido van Rossum0a516c91994-09-12 10:58:40 +00009069# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009070# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009071# (Shared libraries in this instance are shared modules to be loaded into
9072# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9074$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009075if test -z "$LDSHARED"
9076then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009077 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009078 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009079 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009080 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009081 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009082 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009083 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009085 if test "$GCC" = "yes" ; then
9086 LDSHARED='$(CC) -shared'
9087 LDCXXSHARED='$(CXX) -shared'
9088 else
9089 LDSHARED='$(CC) -G'
9090 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009091 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009092 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009093 if test "$GCC" = "yes" ; then
9094 LDSHARED='$(CC) -shared'
9095 LDCXXSHARED='$(CXX) -shared'
9096 else
9097 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009098 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009099 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009100 LDSHARED='$(CC) -bundle'
9101 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009102 if test "$enable_framework" ; then
9103 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009104 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9105 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009106 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009107 else
9108 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009109 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009110 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009111 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009112 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009113 LDSHARED='$(CC) -bundle'
9114 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009115 if test "$enable_framework" ; then
9116 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009117 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9118 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009119 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009120 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009121 # No framework, use the Python app as bundle-loader
9122 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009123 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009124 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009125 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009126 Darwin/*)
9127 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9128 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009129
Ned Deily36820b62014-06-25 13:44:22 -07009130 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9131 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9132 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9133 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9134 if test ${dep_target_major} -eq 10 && \
9135 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009136 then
Ned Deily36820b62014-06-25 13:44:22 -07009137 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009138 LDSHARED='$(CC) -bundle'
9139 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009140 if test "$enable_framework" ; then
9141 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009142 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9143 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009144 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009145 else
9146 # No framework, use the Python app as bundle-loader
9147 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9148 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009149 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009150 fi
Ned Deily36820b62014-06-25 13:44:22 -07009151 else
9152 # building for OS X 10.3 and later
9153 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9154 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9155 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009156 fi
9157 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009158 Linux*|GNU*|QNX*)
9159 LDSHARED='$(CC) -shared'
9160 LDCXXSHARED='$(CXX) -shared';;
9161 BSD/OS*/4*)
9162 LDSHARED="gcc -shared"
9163 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009164 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009165 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009166 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009167 LDSHARED='$(CC) -shared'
9168 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009169 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009170 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009171 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009172 OpenBSD*)
9173 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9174 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009175 LDSHARED='$(CC) -shared $(CCSHARED)'
9176 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009177 else
9178 case `uname -r` in
9179 [01].* | 2.[0-7] | 2.[0-7].*)
9180 LDSHARED="ld -Bshareable ${LDFLAGS}"
9181 ;;
9182 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009183 LDSHARED='$(CC) -shared $(CCSHARED)'
9184 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009185 ;;
9186 esac
9187 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009189 LDSHARED='$(CC) -shared'
9190 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009191 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 if test "$GCC" = "yes" ; then
9193 LDSHARED='$(CC) -shared'
9194 LDCXXSHARED='$(CXX) -shared'
9195 else
9196 LDSHARED='$(CC) -G'
9197 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009198 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009199 SCO_SV*)
9200 LDSHARED='$(CC) -Wl,-G,-Bexport'
9201 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9202 CYGWIN*)
9203 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9204 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009205 *) LDSHARED="ld";;
9206 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9209$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009211BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009212# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009213# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9215$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009216if test -z "$CCSHARED"
9217then
Guido van Rossum07397971997-04-29 21:49:50 +00009218 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009219 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009220 then CCSHARED="-fPIC";
9221 elif test `uname -p` = sparc;
9222 then CCSHARED="-xcode=pic32";
9223 else CCSHARED="-Kpic";
9224 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009225 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009226 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009227 else CCSHARED="+z";
9228 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009229 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009230 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009231 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009232 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009233 if test "$GCC" = "yes"
9234 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009235 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009236 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009237 SCO_SV*)
9238 if test "$GCC" = "yes"
9239 then CCSHARED="-fPIC"
9240 else CCSHARED="-Kpic -belf"
9241 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009242 IRIX*/6*) case $CC in
9243 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009244 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009245 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009246 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9249$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009250# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009251# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9253$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009254if test -z "$LINKFORSHARED"
9255then
Guido van Rossum07397971997-04-29 21:49:50 +00009256 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009257 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009258 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009259 LINKFORSHARED="-Wl,-E -Wl,+s";;
9260# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009261 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009262 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009263 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009265 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009266
9267 # Issue #18075: the default maximum stack size (8MBytes) is too
9268 # small for the default recursion limit. Increase the stack size
9269 # to ensure that tests don't crash
9270 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9271
Jack Jansene578a632001-08-15 01:27:14 +00009272 if test "$enable_framework"
9273 then
Jack Jansenda49e192005-01-07 13:08:22 +00009274 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009275 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009276 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009277 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009278 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009279 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009280 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009281 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9282 then
9283 LINKFORSHARED="-Wl,--export-dynamic"
9284 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009285 SunOS/5*) case $CC in
9286 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009287 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009288 then
9289 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009290 fi;;
9291 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009292 CYGWIN*)
9293 if test $enable_shared = "no"
9294 then
9295 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9296 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009297 QNX*)
9298 # -Wl,-E causes the symbols to be added to the dynamic
9299 # symbol table so that they can be found when a module
9300 # is loaded. -N 2048K causes the stack size to be set
9301 # to 2048 kilobytes so that the stack doesn't overflow
9302 # when running test_compile.py.
9303 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9307$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009308
Michael W. Hudson54241132001-12-07 15:38:26 +00009309
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009310
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9312$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009313if test ! "$LIBRARY" = "$LDLIBRARY"
9314then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009315 case $ac_sys_system in
9316 CYGWIN*)
9317 # Cygwin needs CCSHARED when building extension DLLs
9318 # but not when building the interpreter DLL.
9319 CFLAGSFORSHARED='';;
9320 *)
9321 CFLAGSFORSHARED='$(CCSHARED)'
9322 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9325$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009326
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009327# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9328# library (with --enable-shared).
9329# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009330# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9331# if it is not required, since it creates a dependency of the shared library
9332# to LIBS. This, in turn, means that applications linking the shared libpython
9333# don't need to link LIBS explicitly. The default should be only changed
9334# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009335
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9337$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009338case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009339 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009340 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009341esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9343$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009344
9345
Guido van Rossum627b2d71993-12-24 10:39:16 +00009346# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9348$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009349if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009350 $as_echo_n "(cached) " >&6
9351else
9352 ac_check_lib_save_LIBS=$LIBS
9353LIBS="-lsendfile $LIBS"
9354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9355/* end confdefs.h. */
9356
9357/* Override any GCC internal prototype to avoid an error.
9358 Use char because int might match the return type of a GCC
9359 builtin and then its argument prototype would still apply. */
9360#ifdef __cplusplus
9361extern "C"
9362#endif
9363char sendfile ();
9364int
9365main ()
9366{
9367return sendfile ();
9368 ;
9369 return 0;
9370}
9371_ACEOF
9372if ac_fn_c_try_link "$LINENO"; then :
9373 ac_cv_lib_sendfile_sendfile=yes
9374else
9375 ac_cv_lib_sendfile_sendfile=no
9376fi
9377rm -f core conftest.err conftest.$ac_objext \
9378 conftest$ac_exeext conftest.$ac_ext
9379LIBS=$ac_check_lib_save_LIBS
9380fi
9381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9382$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009383if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009384 cat >>confdefs.h <<_ACEOF
9385#define HAVE_LIBSENDFILE 1
9386_ACEOF
9387
9388 LIBS="-lsendfile $LIBS"
9389
9390fi
9391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9393$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009394if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009396else
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009398LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009402/* Override any GCC internal prototype to avoid an error.
9403 Use char because int might match the return type of a GCC
9404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405#ifdef __cplusplus
9406extern "C"
9407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009408char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009409int
9410main ()
9411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 ;
9414 return 0;
9415}
9416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009417if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009419else
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009422rm -f core conftest.err conftest.$ac_objext \
9423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009424LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9427$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009428if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 cat >>confdefs.h <<_ACEOF
9430#define HAVE_LIBDL 1
9431_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009432
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009433 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009435fi
9436 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9438$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009439if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009441else
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009443LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009447/* Override any GCC internal prototype to avoid an error.
9448 Use char because int might match the return type of a GCC
9449 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009450#ifdef __cplusplus
9451extern "C"
9452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009453char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009454int
9455main ()
9456{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ;
9459 return 0;
9460}
9461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009462if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009464else
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009467rm -f core conftest.err conftest.$ac_objext \
9468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009469LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9472$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 cat >>confdefs.h <<_ACEOF
9475#define HAVE_LIBDLD 1
9476_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009477
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009478 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009479
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480fi
9481 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9483$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9484if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9485 $as_echo_n "(cached) " >&6
9486else
9487 ac_check_lib_save_LIBS=$LIBS
9488LIBS="-lcrypto $LIBS"
9489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9490/* end confdefs.h. */
9491
9492/* Override any GCC internal prototype to avoid an error.
9493 Use char because int might match the return type of a GCC
9494 builtin and then its argument prototype would still apply. */
9495#ifdef __cplusplus
9496extern "C"
9497#endif
9498char RAND_egd ();
9499int
9500main ()
9501{
9502return RAND_egd ();
9503 ;
9504 return 0;
9505}
9506_ACEOF
9507if ac_fn_c_try_link "$LINENO"; then :
9508 ac_cv_lib_crypto_RAND_egd=yes
9509else
9510 ac_cv_lib_crypto_RAND_egd=no
9511fi
9512rm -f core conftest.err conftest.$ac_objext \
9513 conftest$ac_exeext conftest.$ac_ext
9514LIBS=$ac_check_lib_save_LIBS
9515fi
9516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9517$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9518if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9519
9520$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9521
9522fi
9523
Martin v. Löwis519adae2003-09-20 10:47:47 +00009524
Georg Brandlb1441c72009-01-03 22:33:39 +00009525# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009526if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9528$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009529if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009531else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009532 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536/* Override any GCC internal prototype to avoid an error.
9537 Use char because int might match the return type of a GCC
9538 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009539#ifdef __cplusplus
9540extern "C"
9541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009542char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009543int
9544main ()
9545{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ;
9548 return 0;
9549}
9550_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551for ac_lib in '' pthread rt posix4; do
9552 if test -z "$ac_lib"; then
9553 ac_res="none required"
9554 else
9555 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009556 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009558 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009561rm -f core conftest.err conftest.$ac_objext \
9562 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009563 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566done
Victor Stinnere0be4232011-10-25 13:06:09 +02009567if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569else
9570 ac_cv_search_sem_init=no
9571fi
9572rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009573LIBS=$ac_func_search_save_LIBS
9574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9576$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009578if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009580
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009581fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009582 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009583 # posix4 on Solaris 2.6
9584 # pthread (first!) on Linux
9585fi
9586
Martin v. Löwis19d17342003-06-14 21:03:05 +00009587# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9589$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009590if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009591 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009592else
9593 ac_check_lib_save_LIBS=$LIBS
9594LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009596/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598/* Override any GCC internal prototype to avoid an error.
9599 Use char because int might match the return type of a GCC
9600 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009601#ifdef __cplusplus
9602extern "C"
9603#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009604char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009605int
9606main ()
9607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009609 ;
9610 return 0;
9611}
9612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009614 ac_cv_lib_intl_textdomain=yes
9615else
Matthias Kloseb9621712010-04-24 17:59:49 +00009616 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009618rm -f core conftest.err conftest.$ac_objext \
9619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009620LIBS=$ac_check_lib_save_LIBS
9621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9623$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009624if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009625
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009627
Brett Cannonc6d936e2009-06-07 20:09:53 +00009628 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009629fi
9630
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009631
9632# checks for system dependent C++ extensions support
9633case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009634 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9635$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009637/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009638
Georg Brandl59e87bd2011-02-15 19:48:59 +00009639 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009640int
9641main ()
9642{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009643loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ;
9645 return 0;
9646}
Matthias Kloseb159a552010-04-25 21:00:44 +00009647
Martin v. Löwis11437992002-04-12 09:54:03 +00009648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009649if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009650
Matthias Kloseb159a552010-04-25 21:00:44 +00009651
Matthias Kloseb9621712010-04-24 17:59:49 +00009652$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009653
Matthias Kloseb159a552010-04-25 21:00:44 +00009654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009656
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009657else
Matthias Kloseb159a552010-04-25 21:00:44 +00009658
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009660$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009661
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009663rm -f core conftest.err conftest.$ac_objext \
9664 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009665 *) ;;
9666esac
9667
Christian Heimes985ecdc2013-11-20 11:46:18 +01009668# check for systems that require aligned memory access
9669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9670$as_echo_n "checking aligned memory access is required... " >&6; }
9671if test "$cross_compiling" = yes; then :
9672 aligned_required=yes
9673else
9674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9675/* end confdefs.h. */
9676
9677int main()
9678{
9679 char s[16];
9680 int i, *p1, *p2;
9681 for (i=0; i < 16; i++)
9682 s[i] = i;
9683 p1 = (int*)(s+1);
9684 p2 = (int*)(s+2);
9685 if (*p1 == *p2)
9686 return 1;
9687 return 0;
9688}
9689
9690_ACEOF
9691if ac_fn_c_try_run "$LINENO"; then :
9692 aligned_required=no
9693else
9694 aligned_required=yes
9695fi
9696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9697 conftest.$ac_objext conftest.beam conftest.$ac_ext
9698fi
9699
9700
9701if test "$aligned_required" = yes ; then
9702
9703$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9704
9705fi
9706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9707$as_echo "$aligned_required" >&6; }
9708
9709
9710# str, bytes and memoryview hash algorithm
9711
9712
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9714$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9715
9716# Check whether --with-hash_algorithm was given.
9717if test "${with_hash_algorithm+set}" = set; then :
9718 withval=$with_hash_algorithm;
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9720$as_echo "$withval" >&6; }
9721case "$withval" in
9722 siphash24)
9723 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9724
9725 ;;
9726 fnv)
9727 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9728
9729 ;;
9730 *)
9731 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9732 ;;
9733esac
9734
9735else
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9737$as_echo "default" >&6; }
9738fi
9739
9740
Charles-François Natalid30b0222014-05-08 23:08:51 +01009741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9742$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9743
9744# Check whether --with-address_sanitizer was given.
9745if test "${with_address_sanitizer+set}" = set; then :
9746 withval=$with_address_sanitizer;
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9748$as_echo "$withval" >&6; }
9749BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9750LDFLAGS="-fsanitize=address $LDFLAGS"
9751
9752else
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9754$as_echo "no" >&6; }
9755fi
9756
9757
Guido van Rossum70c7f481998-03-26 18:44:10 +00009758# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9760$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009761if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009763else
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009765LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769/* Override any GCC internal prototype to avoid an error.
9770 Use char because int might match the return type of a GCC
9771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009772#ifdef __cplusplus
9773extern "C"
9774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009775char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009776int
9777main ()
9778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ;
9781 return 0;
9782}
9783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009784if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009786else
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009789rm -f core conftest.err conftest.$ac_objext \
9790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009791LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9794$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009795if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009796 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009797fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009798 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9800$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009801if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009805LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809/* Override any GCC internal prototype to avoid an error.
9810 Use char because int might match the return type of a GCC
9811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009812#ifdef __cplusplus
9813extern "C"
9814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009815char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
9818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ;
9821 return 0;
9822}
9823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009824if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829rm -f core conftest.err conftest.$ac_objext \
9830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009831LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9834$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009835if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009836 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009837fi
9838 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009839
Matthias Kloseb9621712010-04-24 17:59:49 +00009840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9841$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009844if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9847$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009848LIBS="$withval $LIBS"
9849
9850else
Matthias Kloseb9621712010-04-24 17:59:49 +00009851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9852$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853fi
9854
Guido van Rossum7f43da71994-08-01 12:15:30 +00009855
Victor Stinner8291b5e2015-03-20 16:03:14 +01009856
9857
9858
9859
9860
9861
9862
9863if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9864 if test -n "$ac_tool_prefix"; then
9865 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9866set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9868$as_echo_n "checking for $ac_word... " >&6; }
9869if ${ac_cv_path_PKG_CONFIG+:} false; then :
9870 $as_echo_n "(cached) " >&6
9871else
9872 case $PKG_CONFIG in
9873 [\\/]* | ?:[\\/]*)
9874 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9875 ;;
9876 *)
9877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9878for as_dir in $PATH
9879do
9880 IFS=$as_save_IFS
9881 test -z "$as_dir" && as_dir=.
9882 for ac_exec_ext in '' $ac_executable_extensions; do
9883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9884 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9886 break 2
9887 fi
9888done
9889 done
9890IFS=$as_save_IFS
9891
9892 ;;
9893esac
9894fi
9895PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9896if test -n "$PKG_CONFIG"; then
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9898$as_echo "$PKG_CONFIG" >&6; }
9899else
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9901$as_echo "no" >&6; }
9902fi
9903
9904
9905fi
9906if test -z "$ac_cv_path_PKG_CONFIG"; then
9907 ac_pt_PKG_CONFIG=$PKG_CONFIG
9908 # Extract the first word of "pkg-config", so it can be a program name with args.
9909set dummy pkg-config; ac_word=$2
9910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911$as_echo_n "checking for $ac_word... " >&6; }
9912if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9913 $as_echo_n "(cached) " >&6
9914else
9915 case $ac_pt_PKG_CONFIG in
9916 [\\/]* | ?:[\\/]*)
9917 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9918 ;;
9919 *)
9920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9921for as_dir in $PATH
9922do
9923 IFS=$as_save_IFS
9924 test -z "$as_dir" && as_dir=.
9925 for ac_exec_ext in '' $ac_executable_extensions; do
9926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9927 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9929 break 2
9930 fi
9931done
9932 done
9933IFS=$as_save_IFS
9934
9935 ;;
9936esac
9937fi
9938ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9939if test -n "$ac_pt_PKG_CONFIG"; then
9940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9941$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9942else
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944$as_echo "no" >&6; }
9945fi
9946
9947 if test "x$ac_pt_PKG_CONFIG" = x; then
9948 PKG_CONFIG=""
9949 else
9950 case $cross_compiling:$ac_tool_warned in
9951yes:)
9952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9954ac_tool_warned=yes ;;
9955esac
9956 PKG_CONFIG=$ac_pt_PKG_CONFIG
9957 fi
9958else
9959 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9960fi
9961
9962fi
9963if test -n "$PKG_CONFIG"; then
9964 _pkg_min_version=0.9.0
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9966$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9967 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9969$as_echo "yes" >&6; }
9970 else
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973 PKG_CONFIG=""
9974 fi
9975fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009976
9977# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9979$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009980
9981# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009982if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009983 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009984else
9985 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009986fi
9987
9988
Matthias Kloseb9621712010-04-24 17:59:49 +00009989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9990$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009991
9992# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9994$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009995
9996# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009997if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009998 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009999else
10000 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010001fi
10002
10003
10004if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010005 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10006else
10007 LIBFFI_INCLUDEDIR=""
10008fi
10009
10010
Matthias Kloseb9621712010-04-24 17:59:49 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10012$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010013
Stefan Krah60187b52012-03-23 19:06:27 +010010014# Check for use of the system libmpdec library
10015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10016$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10017
10018# Check whether --with-system_libmpdec was given.
10019if test "${with_system_libmpdec+set}" = set; then :
10020 withval=$with_system_libmpdec;
10021else
10022 with_system_libmpdec="no"
10023fi
10024
10025
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10027$as_echo "$with_system_libmpdec" >&6; }
10028
Benjamin Peterson076ed002010-10-31 17:11:02 +000010029# Check for support for loadable sqlite extensions
10030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10031$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10032# Check whether --enable-loadable-sqlite-extensions was given.
10033if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10034 enableval=$enable_loadable_sqlite_extensions;
10035else
10036 enable_loadable_sqlite_extensions="no"
10037fi
10038
10039
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10041$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10042
Ned Deilyd819b932013-09-06 01:07:05 -070010043# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10044
10045
10046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10047$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10048
10049# Check whether --with-tcltk-includes was given.
10050if test "${with_tcltk_includes+set}" = set; then :
10051 withval=$with_tcltk_includes;
10052else
10053 with_tcltk_includes="default"
10054fi
10055
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10057$as_echo "$with_tcltk_includes" >&6; }
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10059$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10060
10061# Check whether --with-tcltk-libs was given.
10062if test "${with_tcltk_libs+set}" = set; then :
10063 withval=$with_tcltk_libs;
10064else
10065 with_tcltk_libs="default"
10066fi
10067
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10069$as_echo "$with_tcltk_libs" >&6; }
10070if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10071then
10072 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10073 then
10074 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10075 fi
10076 TCLTK_INCLUDES=""
10077 TCLTK_LIBS=""
10078else
10079 TCLTK_INCLUDES="$with_tcltk_includes"
10080 TCLTK_LIBS="$with_tcltk_libs"
10081fi
10082
Matthias Klose55708cc2009-04-30 08:06:49 +000010083# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10085$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010086
10087# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010088if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010089 withval=$with_dbmliborder;
10090if test x$with_dbmliborder = xyes
10091then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010092as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010093else
10094 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10095 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10096 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010097 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010098 fi
10099 done
10100fi
10101fi
10102
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10104$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010105
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010106# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010107
10108
Matthias Kloseb9621712010-04-24 17:59:49 +000010109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10110$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010113if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114 withval=$with_signal_module;
10115fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010116
10117
10118if test -z "$with_signal_module"
10119then with_signal_module="yes"
10120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10122$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010123
10124if test "${with_signal_module}" = "yes"; then
10125 USE_SIGNAL_MODULE=""
10126 SIGNAL_OBJS=""
10127else
10128 USE_SIGNAL_MODULE="#"
10129 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10130fi
10131
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010132# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010133
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010134USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010136
Martin v. Löwis11437992002-04-12 09:54:03 +000010137
10138# Templates for things AC_DEFINEd more than once.
10139# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010140
10141
Martin v. Löwis11437992002-04-12 09:54:03 +000010142
Matthias Kloseb9621712010-04-24 17:59:49 +000010143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10144$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010147if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148 withval=$with_threads;
10149fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010150
10151
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010152# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010155if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010156 withval=$with_thread; with_threads=$with_thread
10157fi
10158
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010159
10160if test -z "$with_threads"
10161then with_threads="yes"
10162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10164$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010165
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010166
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010167if test "$with_threads" = "no"
10168then
10169 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010170elif test "$ac_cv_pthread_is_default" = yes
10171then
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010173
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010174 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010176
10177 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010179elif test "$ac_cv_kpthread" = "yes"
10180then
10181 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010182 if test "$ac_cv_cxx_thread" = "yes"; then
10183 CXX="$CXX -Kpthread"
10184 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010186
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010187 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010188 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010189elif test "$ac_cv_kthread" = "yes"
10190then
10191 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010192 if test "$ac_cv_cxx_thread" = "yes"; then
10193 CXX="$CXX -Kthread"
10194 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010196
10197 posix_threads=yes
10198 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010199elif test "$ac_cv_pthread" = "yes"
10200then
10201 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010202 if test "$ac_cv_cxx_thread" = "yes"; then
10203 CXX="$CXX -pthread"
10204 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010206
10207 posix_threads=yes
10208 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010209else
10210 if test ! -z "$with_threads" -a -d "$with_threads"
10211 then LDFLAGS="$LDFLAGS -L$with_threads"
10212 fi
10213 if test ! -z "$withval" -a -d "$withval"
10214 then LDFLAGS="$LDFLAGS -L$withval"
10215 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010216
10217 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010218 # define _POSIX_THREADS in unistd.h. Some apparently don't
10219 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10221$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010223/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010224
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010225#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010226#ifdef _POSIX_THREADS
10227yes
10228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010229
10230_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010231if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010233 unistd_defines_pthreads=yes
10234else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235 unistd_defines_pthreads=no
10236fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010237rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010238
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10240$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010243
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010244 # Just looking for pthread_create in libpthread is not enough:
10245 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10246 # So we really have to include pthread.h, and then link.
10247 _libs=$LIBS
10248 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10250$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010252/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010253
10254#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010255#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010256
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010257void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010258int
10259main ()
10260{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010261
10262pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 ;
10264 return 0;
10265}
10266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010268
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10270$as_echo "yes" >&6; }
10271 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010272
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010273 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010274 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010275else
Martin v. Löwis11437992002-04-12 09:54:03 +000010276
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010277 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010279if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010281
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010282 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010283 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010284else
Guido van Rossumad678af1998-10-02 14:42:15 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10287$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010288if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010290else
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010292LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296/* Override any GCC internal prototype to avoid an error.
10297 Use char because int might match the return type of a GCC
10298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010299#ifdef __cplusplus
10300extern "C"
10301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010302char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010303int
10304main ()
10305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ;
10308 return 0;
10309}
10310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010313else
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010316rm -f core conftest.err conftest.$ac_objext \
10317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010318LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10321$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010322if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010324
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010325 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010326 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010327 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010328else
Greg Steinadf63d62000-07-05 10:38:09 +000010329
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10331$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010332if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010334else
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010336LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340/* Override any GCC internal prototype to avoid an error.
10341 Use char because int might match the return type of a GCC
10342 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010343#ifdef __cplusplus
10344extern "C"
10345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010346char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010347int
10348main ()
10349{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 ;
10352 return 0;
10353}
10354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010355if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010357else
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010360rm -f core conftest.err conftest.$ac_objext \
10361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010362LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10365$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010366if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010367 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010368
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010369 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010370 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010371 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010372else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010373
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10375$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010376if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010378else
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010380LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384/* Override any GCC internal prototype to avoid an error.
10385 Use char because int might match the return type of a GCC
10386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010387#ifdef __cplusplus
10388extern "C"
10389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010390char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010391int
10392main ()
10393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ;
10396 return 0;
10397}
10398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010399if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010401else
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010404rm -f core conftest.err conftest.$ac_objext \
10405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010406LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10409$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010410if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010412
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010413 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010414 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010415 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010416else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010417
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10419$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010420if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010422else
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010424LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428/* Override any GCC internal prototype to avoid an error.
10429 Use char because int might match the return type of a GCC
10430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010431#ifdef __cplusplus
10432extern "C"
10433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010434char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010435int
10436main ()
10437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010448rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010450LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10453$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010454if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010456
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010457 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010458 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010459 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010460else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010461
Martin v. Löwis130fb172001-07-19 11:00:41 +000010462 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010463fi
10464
Guido van Rossum627b2d71993-12-24 10:39:16 +000010465
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010466fi
10467
Guido van Rossum0be3e491997-05-22 20:33:33 +000010468fi
10469
Guido van Rossum49545951997-12-02 19:28:29 +000010470fi
10471
Guido van Rossumb93a8621998-05-07 13:27:32 +000010472fi
10473
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010475rm -f core conftest.err conftest.$ac_objext \
10476 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010477
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10479$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010480if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010482else
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010484LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488/* Override any GCC internal prototype to avoid an error.
10489 Use char because int might match the return type of a GCC
10490 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010491#ifdef __cplusplus
10492extern "C"
10493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010494char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010495int
10496main ()
10497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 ;
10500 return 0;
10501}
10502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010503if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010505else
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010508rm -f core conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010510LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10513$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010514if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010516
Martin v. Löwis130fb172001-07-19 11:00:41 +000010517 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010518 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010519 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010520fi
10521
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010522
Neal Norwitza978ab02002-11-02 16:58:05 +000010523 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10525$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010526if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528else
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010530LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534/* Override any GCC internal prototype to avoid an error.
10535 Use char because int might match the return type of a GCC
10536 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010537#ifdef __cplusplus
10538extern "C"
10539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010540char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010541int
10542main ()
10543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 ;
10546 return 0;
10547}
10548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010550 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010551else
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010554rm -f core conftest.err conftest.$ac_objext \
10555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010556LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10559$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010560if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010562
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010563 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010564 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010565 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010566fi
10567
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010568 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010569fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010570
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010571if test "$posix_threads" = "yes"; then
10572 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010573
Matthias Kloseb9621712010-04-24 17:59:49 +000010574$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010575
10576 fi
10577
10578 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10579 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010580 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010581$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010582
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010583 ;;
10584 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010585$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010586
10587 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010588 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010589$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010590
10591 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010592 esac
10593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10595$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010596 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010598else
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010600 ac_cv_pthread_system_supported=no
10601else
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010603/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010604
10605 #include <stdio.h>
10606 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607 void *foo(void *parm) {
10608 return NULL;
10609 }
10610 main() {
10611 pthread_attr_t attr;
10612 pthread_t id;
10613 if (pthread_attr_init(&attr)) exit(-1);
10614 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10615 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10616 exit(0);
10617 }
10618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010619if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620 ac_cv_pthread_system_supported=yes
10621else
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10625 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010627
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628
Guido van Rossum627b2d71993-12-24 10:39:16 +000010629fi
10630
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10632$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633 if test "$ac_cv_pthread_system_supported" = "yes"; then
10634
Matthias Kloseb9621712010-04-24 17:59:49 +000010635$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010636
10637 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010638 for ac_func in pthread_sigmask
10639do :
10640 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010641if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010643#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010644_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010645 case $ac_sys_system in
10646 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010649
10650 ;;
10651 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652fi
10653done
10654
Christian Heimesf77b4b22013-08-21 13:26:05 +020010655 for ac_func in pthread_atfork
10656do :
10657 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10658if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10659 cat >>confdefs.h <<_ACEOF
10660#define HAVE_PTHREAD_ATFORK 1
10661_ACEOF
10662
10663fi
10664done
10665
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666fi
10667
10668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10672$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010673# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010674if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010676 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10678$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679 ipv6=no
10680 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10682$as_echo "yes" >&6; }
10683 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684
10685 ipv6=yes
10686 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688else
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010691/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010692 /* AF_INET6 available check */
10693#include <sys/types.h>
10694#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010695int
10696main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010698int domain = AF_INET6;
10699 ;
10700 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010701}
Martin v. Löwis11437992002-04-12 09:54:03 +000010702_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010703if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010704
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10706$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010708
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010709else
Matthias Kloseb159a552010-04-25 21:00:44 +000010710
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010714
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010718if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10720$as_echo_n "checking if RFC2553 API is available... " >&6; }
10721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010722/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010723
10724 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010725#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010726int
10727main ()
10728{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010729struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010730 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 ;
10732 return 0;
10733}
Matthias Kloseb159a552010-04-25 21:00:44 +000010734
Martin v. Löwis11437992002-04-12 09:54:03 +000010735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010736if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010737
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010739$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010740 ipv6=yes
10741
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010742else
Matthias Kloseb159a552010-04-25 21:00:44 +000010743
10744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010745$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010746 ipv6=no
10747
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010750fi
10751
10752if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010754
10755fi
10756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757fi
10758
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759
10760ipv6type=unknown
10761ipv6lib=none
10762ipv6trylibc=no
10763
10764if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10766$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010767 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10768 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769 case $i in
10770 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010773
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774#include <netinet/in.h>
10775#ifdef IPV6_INRIA_VERSION
10776yes
10777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010778_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010781 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010783rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784
10785 ;;
10786 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010788/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010789
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790#include <netinet/in.h>
10791#ifdef __KAME__
10792yes
10793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010794_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797 ipv6type=$i;
10798 ipv6lib=inet6
10799 ipv6libdir=/usr/local/v6/lib
10800 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010802rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803
10804 ;;
10805 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809#include <features.h>
10810#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10811yes
10812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010813_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816 ipv6type=$i;
10817 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010819rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820
10821 ;;
10822 linux-inet6)
10823 if test -d /usr/inet6; then
10824 ipv6type=$i
10825 ipv6lib=inet6
10826 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010827 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828 fi
10829 ;;
10830 solaris)
10831 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010832 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833 ipv6type=$i
10834 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835 fi
10836 fi
10837 ;;
10838 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010840/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842#include <sys/param.h>
10843#ifdef _TOSHIBA_INET6
10844yes
10845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010846_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849 ipv6type=$i;
10850 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010851 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010853rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854
10855 ;;
10856 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010858/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010859
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860#include </usr/local/v6/include/sys/v6config.h>
10861#ifdef __V6D__
10862yes
10863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010864_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867 ipv6type=$i;
10868 ipv6lib=v6;
10869 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010870 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010872rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873
10874 ;;
10875 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010877/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879#include <sys/param.h>
10880#ifdef _ZETA_MINAMI_INET6
10881yes
10882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010883_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886 ipv6type=$i;
10887 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010888 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010890rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891
10892 ;;
10893 esac
10894 if test "$ipv6type" != "unknown"; then
10895 break
10896 fi
10897 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10899$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900fi
10901
10902if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10903 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10904 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10905 echo "using lib$ipv6lib"
10906 else
10907 if test $ipv6trylibc = "yes"; then
10908 echo "using libc"
10909 else
10910 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10911 echo "You need to fetch lib$ipv6lib.a from appropriate"
10912 echo 'ipv6 kit and compile beforehand.'
10913 exit 1
10914 fi
10915 fi
10916fi
10917
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10919$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10921/* end confdefs.h. */
10922 /* CAN_RAW_FD_FRAMES available check */
10923#include <linux/can/raw.h>
10924int
10925main ()
10926{
10927int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10928 ;
10929 return 0;
10930}
10931_ACEOF
10932if ac_fn_c_try_compile "$LINENO"; then :
10933
10934
10935$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10936
10937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10938$as_echo "yes" >&6; }
10939
10940else
10941
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10943$as_echo "no" >&6; }
10944
10945fi
10946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10949$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010951/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010952
10953 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010954int
10955main ()
10956{
10957FSIORefNum fRef = 0
10958 ;
10959 return 0;
10960}
Matthias Kloseb159a552010-04-25 21:00:44 +000010961
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010964
Matthias Kloseb159a552010-04-25 21:00:44 +000010965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10969$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010970
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010971else
Matthias Kloseb159a552010-04-25 21:00:44 +000010972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10974$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010975
10976fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10978
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010979# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10981$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010984if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010985 withval=$with_doc_strings;
10986fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010987
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010988
10989if test -z "$with_doc_strings"
10990then with_doc_strings="yes"
10991fi
10992if test "$with_doc_strings" != "no"
10993then
10994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010996
10997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10999$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011000
Antoine Pitrou042b1282010-08-13 21:15:58 +000011001# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11003$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011006if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011008if test "$withval" != no
11009then
11010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11014$as_echo "yes" >&6; }
11015else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011017fi
11018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11020$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021fi
11022
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011023
11024# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11026$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011028# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011029if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011030 withval=$with_pymalloc;
11031fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011032
Neil Schemenauera35c6882001-02-27 04:45:05 +000011033
Neil Schemenauer16c22972002-03-22 15:34:49 +000011034if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011035then
11036 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011037fi
11038if test "$with_pymalloc" != "no"
11039then
Martin v. Löwis11437992002-04-12 09:54:03 +000011040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011042
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011043 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11046$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011047
Benjamin Peterson05159c42009-12-03 03:01:27 +000011048# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11050$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011051
11052# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011053if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011054 withval=$with_valgrind;
11055else
11056 with_valgrind=no
11057fi
11058
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11060$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011061if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011062 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 +020011063if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011066
11067else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011068 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011069
11070fi
11071
11072
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011073 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011074fi
11075
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011076# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011077
Guido van Rossum98935bf2001-09-05 19:13:16 +000011078DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011079
Guido van Rossume97ee181999-12-20 21:27:22 +000011080# the dlopen() function means we might want to use dynload_shlib.o. some
11081# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011082for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011083do :
11084 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011085if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011087#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011089
Guido van Rossume97ee181999-12-20 21:27:22 +000011090fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011091done
Guido van Rossume97ee181999-12-20 21:27:22 +000011092
Michael W. Hudson54241132001-12-07 15:38:26 +000011093
Guido van Rossume97ee181999-12-20 21:27:22 +000011094# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11095# loading of modules.
11096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11098$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011099if test -z "$DYNLOADFILE"
11100then
11101 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011102 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11103 if test "$ac_cv_func_dlopen" = yes
11104 then DYNLOADFILE="dynload_shlib.o"
11105 else DYNLOADFILE="dynload_aix.o"
11106 fi
11107 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011108 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011109 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11110 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011111 *)
11112 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11113 # out any dynamic loading
11114 if test "$ac_cv_func_dlopen" = yes
11115 then DYNLOADFILE="dynload_shlib.o"
11116 else DYNLOADFILE="dynload_stub.o"
11117 fi
11118 ;;
11119 esac
11120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11122$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011123if test "$DYNLOADFILE" != "dynload_stub.o"
11124then
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011127
11128fi
11129
Neil Schemenauer4e425612001-06-19 15:44:15 +000011130# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11131
Michael W. Hudson54241132001-12-07 15:38:26 +000011132
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11134$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011135if test -z "$MACHDEP_OBJS"
11136then
Jack Jansene578a632001-08-15 01:27:14 +000011137 MACHDEP_OBJS=$extra_machdep_objs
11138else
11139 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011140fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011141if test -z "$MACHDEP_OBJS"; then
11142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11143$as_echo "none" >&6; }
11144else
11145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11146$as_echo "$MACHDEP_OBJS" >&6; }
11147fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011148
Guido van Rossum627b2d71993-12-24 10:39:16 +000011149# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011150for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011151 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011152 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011153 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011154 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011155 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011156 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011157 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11158 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011159 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011160 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011161 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011162 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011163 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011164 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011165 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11166 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011167 sigaction sigaltstack siginterrupt sigpending sigrelse \
11168 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011169 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011170 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011171 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011172do :
11173 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11174ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011175if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011178_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011179
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011180fi
11181done
11182
Michael W. Hudson54241132001-12-07 15:38:26 +000011183
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011184ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11185 #include <dirent.h>
11186"
11187if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11188
11189$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11190
11191fi
11192
11193
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011194# For some functions, having a definition is not sufficient, since
11195# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11197$as_echo_n "checking for chroot... " >&6; }
11198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011199/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011200#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011201int
11202main ()
11203{
11204void *x=chroot
11205 ;
11206 return 0;
11207}
11208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011212
Matthias Kloseb159a552010-04-25 21:00:44 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011214$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011215else
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011218
11219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11222$as_echo_n "checking for link... " >&6; }
11223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011224/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011225#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011226int
11227main ()
11228{
11229void *x=link
11230 ;
11231 return 0;
11232}
11233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011237
Matthias Kloseb159a552010-04-25 21:00:44 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011240else
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011243
11244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11247$as_echo_n "checking for symlink... " >&6; }
11248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011250#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011251int
11252main ()
11253{
11254void *x=symlink
11255 ;
11256 return 0;
11257}
11258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011259if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262
Matthias Kloseb159a552010-04-25 21:00:44 +000011263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011265else
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11267$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011268
11269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11272$as_echo_n "checking for fchdir... " >&6; }
11273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011275#include <unistd.h>
11276int
11277main ()
11278{
11279void *x=fchdir
11280 ;
11281 return 0;
11282}
11283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011285
Matthias Kloseb9621712010-04-24 17:59:49 +000011286$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011287
Matthias Kloseb159a552010-04-25 21:00:44 +000011288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011289$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011290else
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11292$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011293
11294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11297$as_echo_n "checking for fsync... " >&6; }
11298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011300#include <unistd.h>
11301int
11302main ()
11303{
11304void *x=fsync
11305 ;
11306 return 0;
11307}
11308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011312
Matthias Kloseb159a552010-04-25 21:00:44 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011315else
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11317$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011318
11319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11322$as_echo_n "checking for fdatasync... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011325#include <unistd.h>
11326int
11327main ()
11328{
11329void *x=fdatasync
11330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011337
Matthias Kloseb159a552010-04-25 21:00:44 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011340else
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011343
11344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11347$as_echo_n "checking for epoll... " >&6; }
11348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011349/* end confdefs.h. */
11350#include <sys/epoll.h>
11351int
11352main ()
11353{
11354void *x=epoll_create
11355 ;
11356 return 0;
11357}
11358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011362
Matthias Kloseb159a552010-04-25 21:00:44 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011365else
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011368
11369fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11372$as_echo_n "checking for epoll_create1... " >&6; }
11373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11374/* end confdefs.h. */
11375#include <sys/epoll.h>
11376int
11377main ()
11378{
11379void *x=epoll_create1
11380 ;
11381 return 0;
11382}
11383_ACEOF
11384if ac_fn_c_try_compile "$LINENO"; then :
11385
11386$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11387
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11389$as_echo "yes" >&6; }
11390else
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
11393
11394fi
11395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11397$as_echo_n "checking for kqueue... " >&6; }
11398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011399/* end confdefs.h. */
11400
11401#include <sys/types.h>
11402#include <sys/event.h>
11403
11404int
11405main ()
11406{
11407int x=kqueue()
11408 ;
11409 return 0;
11410}
11411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011412if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011413
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011415
Matthias Kloseb159a552010-04-25 21:00:44 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011417$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011418else
Matthias Kloseb9621712010-04-24 17:59:49 +000011419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11420$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011421
11422fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11425$as_echo_n "checking for prlimit... " >&6; }
11426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11427/* end confdefs.h. */
11428
11429#include <sys/time.h>
11430#include <sys/resource.h>
11431
11432int
11433main ()
11434{
11435void *x=prlimit
11436 ;
11437 return 0;
11438}
11439_ACEOF
11440if ac_fn_c_try_compile "$LINENO"; then :
11441
11442$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11443
11444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11445$as_echo "yes" >&6; }
11446else
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11448$as_echo "no" >&6; }
11449
11450fi
11451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11452
Martin v. Löwisd5843682002-11-21 20:41:28 +000011453# On some systems (eg. FreeBSD 5), we would find a definition of the
11454# functions ctermid_r, setgroups in the library, but no prototype
11455# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11456# address to avoid compiler warnings and potential miscompilations
11457# because of the missing prototypes.
11458
Matthias Kloseb9621712010-04-24 17:59:49 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11460$as_echo_n "checking for ctermid_r... " >&6; }
11461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011462/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011463
Martin v. Löwisd5843682002-11-21 20:41:28 +000011464#include <stdio.h>
11465
Martin v. Löwisd5843682002-11-21 20:41:28 +000011466int
11467main ()
11468{
11469void* p = ctermid_r
11470 ;
11471 return 0;
11472}
11473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011475
Matthias Kloseb9621712010-04-24 17:59:49 +000011476$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011477
Matthias Kloseb159a552010-04-25 21:00:44 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011479$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011483
11484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11486
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11488$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011489if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011490 $as_echo_n "(cached) " >&6
11491else
11492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011493/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011494#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011495int
11496main ()
11497{
11498void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011499
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011505 ac_cv_flock_decl=yes
11506else
11507 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011508
11509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011511
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011512fi
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11514$as_echo "$ac_cv_flock_decl" >&6; }
11515if test "x${ac_cv_flock_decl}" = xyes; then
11516 for ac_func in flock
11517do :
11518 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011519if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011520 cat >>confdefs.h <<_ACEOF
11521#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011522_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011523
Antoine Pitroua3000072010-09-07 14:52:42 +000011524else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011526$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011527if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011528 $as_echo_n "(cached) " >&6
11529else
11530 ac_check_lib_save_LIBS=$LIBS
11531LIBS="-lbsd $LIBS"
11532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533/* end confdefs.h. */
11534
11535/* Override any GCC internal prototype to avoid an error.
11536 Use char because int might match the return type of a GCC
11537 builtin and then its argument prototype would still apply. */
11538#ifdef __cplusplus
11539extern "C"
11540#endif
11541char flock ();
11542int
11543main ()
11544{
11545return flock ();
11546 ;
11547 return 0;
11548}
11549_ACEOF
11550if ac_fn_c_try_link "$LINENO"; then :
11551 ac_cv_lib_bsd_flock=yes
11552else
11553 ac_cv_lib_bsd_flock=no
11554fi
11555rm -f core conftest.err conftest.$ac_objext \
11556 conftest$ac_exeext conftest.$ac_ext
11557LIBS=$ac_check_lib_save_LIBS
11558fi
11559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11560$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011561if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011562 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011563
11564
11565$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11566
11567
11568fi
11569
11570
11571fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011572done
11573
Antoine Pitroua3000072010-09-07 14:52:42 +000011574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011575
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11577$as_echo_n "checking for getpagesize... " >&6; }
11578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011579/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011580
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011581#include <unistd.h>
11582
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011583int
11584main ()
11585{
11586void* p = getpagesize
11587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011594
Matthias Kloseb159a552010-04-25 21:00:44 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011600
11601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011603
Victor Stinner984890f2011-11-24 13:53:38 +010011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11605$as_echo_n "checking for broken unsetenv... " >&6; }
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11607/* end confdefs.h. */
11608
11609#include <stdlib.h>
11610
11611int
11612main ()
11613{
11614int res = unsetenv("DUMMY")
11615 ;
11616 return 0;
11617}
11618_ACEOF
11619if ac_fn_c_try_compile "$LINENO"; then :
11620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11621$as_echo "no" >&6; }
11622else
11623
11624$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11625
11626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11627$as_echo "yes" >&6; }
11628
11629fi
11630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11631
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011632for ac_prog in true
11633do
11634 # Extract the first word of "$ac_prog", so it can be a program name with args.
11635set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11637$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011638if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011640else
11641 if test -n "$TRUE"; then
11642 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11643else
11644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11645for as_dir in $PATH
11646do
11647 IFS=$as_save_IFS
11648 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011651 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 $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 +000011653 break 2
11654 fi
11655done
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011658
11659fi
11660fi
11661TRUE=$ac_cv_prog_TRUE
11662if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11664$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011668fi
11669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011671 test -n "$TRUE" && break
11672done
11673test -n "$TRUE" || TRUE="/bin/true"
11674
11675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11677$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011678if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011680else
11681 ac_check_lib_save_LIBS=$LIBS
11682LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011684/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011686/* Override any GCC internal prototype to avoid an error.
11687 Use char because int might match the return type of a GCC
11688 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011689#ifdef __cplusplus
11690extern "C"
11691#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011692char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011693int
11694main ()
11695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011697 ;
11698 return 0;
11699}
11700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011701if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011702 ac_cv_lib_c_inet_aton=yes
11703else
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011706rm -f core conftest.err conftest.$ac_objext \
11707 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011708LIBS=$ac_check_lib_save_LIBS
11709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11711$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011712if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011713 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011714else
Matthias Kloseb9621712010-04-24 17:59:49 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11716$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011717if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011719else
11720 ac_check_lib_save_LIBS=$LIBS
11721LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011723/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725/* Override any GCC internal prototype to avoid an error.
11726 Use char because int might match the return type of a GCC
11727 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011728#ifdef __cplusplus
11729extern "C"
11730#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011731char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011732int
11733main ()
11734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011735return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011736 ;
11737 return 0;
11738}
11739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011741 ac_cv_lib_resolv_inet_aton=yes
11742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011745rm -f core conftest.err conftest.$ac_objext \
11746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011747LIBS=$ac_check_lib_save_LIBS
11748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11750$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011751if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011752 cat >>confdefs.h <<_ACEOF
11753#define HAVE_LIBRESOLV 1
11754_ACEOF
11755
11756 LIBS="-lresolv $LIBS"
11757
11758fi
11759
11760
11761fi
11762
11763
Christian Heimesd0764e22007-12-04 15:00:33 +000011764# On Tru64, chflags seems to be present, but calling it will
11765# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11767$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011768if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011770else
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011772 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011775/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011776
Christian Heimesd0764e22007-12-04 15:00:33 +000011777#include <sys/stat.h>
11778#include <unistd.h>
11779int main(int argc, char*argv[])
11780{
11781 if(chflags(argv[0], 0) != 0)
11782 return 1;
11783 return 0;
11784}
Ned Deily3eb67d52011-06-28 00:00:28 -070011785
Christian Heimesd0764e22007-12-04 15:00:33 +000011786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011788 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011794fi
11795
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11799$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011800if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011802if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011803 ac_cv_have_chflags="yes"
11804else
11805 ac_cv_have_chflags="no"
11806fi
11807
11808fi
11809if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011812
11813fi
11814
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11816$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011821 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011824/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011825
Christian Heimesd0764e22007-12-04 15:00:33 +000011826#include <sys/stat.h>
11827#include <unistd.h>
11828int main(int argc, char*argv[])
11829{
11830 if(lchflags(argv[0], 0) != 0)
11831 return 1;
11832 return 0;
11833}
Ned Deily3eb67d52011-06-28 00:00:28 -070011834
Christian Heimesd0764e22007-12-04 15:00:33 +000011835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011837 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011843fi
11844
11845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11848$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011849if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011852 ac_cv_have_lchflags="yes"
11853else
11854 ac_cv_have_lchflags="no"
11855fi
11856
11857fi
11858if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011861
11862fi
11863
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011864case $ac_sys_system/$ac_sys_release in
11865Darwin/*)
11866 _CUR_CFLAGS="${CFLAGS}"
11867 _CUR_LDFLAGS="${LDFLAGS}"
11868 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11869 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11870 ;;
11871esac
11872
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11874$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011875if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011877else
11878 ac_check_lib_save_LIBS=$LIBS
11879LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011881/* end confdefs.h. */
11882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011883/* Override any GCC internal prototype to avoid an error.
11884 Use char because int might match the return type of a GCC
11885 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011886#ifdef __cplusplus
11887extern "C"
11888#endif
11889char inflateCopy ();
11890int
11891main ()
11892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011894 ;
11895 return 0;
11896}
11897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011898if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011899 ac_cv_lib_z_inflateCopy=yes
11900else
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011902fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011903rm -f core conftest.err conftest.$ac_objext \
11904 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011905LIBS=$ac_check_lib_save_LIBS
11906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11908$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011909if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011912
11913fi
11914
11915
11916case $ac_sys_system/$ac_sys_release in
11917Darwin/*)
11918 CFLAGS="${_CUR_CFLAGS}"
11919 LDFLAGS="${_CUR_LDFLAGS}"
11920 ;;
11921esac
11922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11924$as_echo_n "checking for hstrerror... " >&6; }
11925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011926/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011927
Martin v. Löwise9416172003-05-03 10:12:45 +000011928#include <netdb.h>
11929
Martin v. Löwise9416172003-05-03 10:12:45 +000011930int
11931main ()
11932{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011933void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011934 ;
11935 return 0;
11936}
11937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011938if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011941
Matthias Kloseb159a552010-04-25 21:00:44 +000011942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011943$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011944else
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11946$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011947
11948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011949rm -f core conftest.err conftest.$ac_objext \
11950 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11953$as_echo_n "checking for inet_aton... " >&6; }
11954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011955/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011956
Martin v. Löwis86d66262006-02-17 08:40:11 +000011957#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011958#include <sys/socket.h>
11959#include <netinet/in.h>
11960#include <arpa/inet.h>
11961
Martin v. Löwise9416172003-05-03 10:12:45 +000011962int
11963main ()
11964{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011965void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011966 ;
11967 return 0;
11968}
11969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011973
Matthias Kloseb159a552010-04-25 21:00:44 +000011974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011976else
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11978$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011979
11980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011981rm -f core conftest.err conftest.$ac_objext \
11982 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11985$as_echo_n "checking for inet_pton... " >&6; }
11986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011987/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011988
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011989#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011990#include <sys/socket.h>
11991#include <netinet/in.h>
11992#include <arpa/inet.h>
11993
Martin v. Löwise9416172003-05-03 10:12:45 +000011994int
11995main ()
11996{
11997void* p = inet_pton
11998 ;
11999 return 0;
12000}
12001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012005
Matthias Kloseb159a552010-04-25 21:00:44 +000012006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012007$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12010$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012011
12012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012014
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012015# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12017$as_echo_n "checking for setgroups... " >&6; }
12018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012020
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012021#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012022#ifdef HAVE_GRP_H
12023#include <grp.h>
12024#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012025
Martin v. Löwisd5843682002-11-21 20:41:28 +000012026int
12027main ()
12028{
12029void* p = setgroups
12030 ;
12031 return 0;
12032}
12033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012037
Matthias Kloseb159a552010-04-25 21:00:44 +000012038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012039$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012043
12044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012047# check for openpty and forkpty
12048
12049for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012050do :
12051 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012052if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012055_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012056
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012057else
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12059$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012062else
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012064LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068/* Override any GCC internal prototype to avoid an error.
12069 Use char because int might match the return type of a GCC
12070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012071#ifdef __cplusplus
12072extern "C"
12073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012074char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012075int
12076main ()
12077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 ;
12080 return 0;
12081}
12082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012085else
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012088rm -f core conftest.err conftest.$ac_objext \
12089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012090LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12093$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012094if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012096 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12099$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012100if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012102else
12103 ac_check_lib_save_LIBS=$LIBS
12104LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012106/* end confdefs.h. */
12107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108/* Override any GCC internal prototype to avoid an error.
12109 Use char because int might match the return type of a GCC
12110 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012111#ifdef __cplusplus
12112extern "C"
12113#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012114char openpty ();
12115int
12116main ()
12117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012119 ;
12120 return 0;
12121}
12122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012124 ac_cv_lib_bsd_openpty=yes
12125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012128rm -f core conftest.err conftest.$ac_objext \
12129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012130LIBS=$ac_check_lib_save_LIBS
12131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12133$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012134if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012136 LIBS="$LIBS -lbsd"
12137fi
12138
12139
12140fi
12141
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142
12143fi
12144done
12145
12146for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012147do :
12148 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012149if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012152_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153
Fred Drake8cef4cf2000-06-28 16:40:38 +000012154else
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12156$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012157if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012159else
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012161LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165/* Override any GCC internal prototype to avoid an error.
12166 Use char because int might match the return type of a GCC
12167 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012168#ifdef __cplusplus
12169extern "C"
12170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012171char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012172int
12173main ()
12174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 ;
12177 return 0;
12178}
12179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182else
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012185rm -f core conftest.err conftest.$ac_objext \
12186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012187LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12190$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012193 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12196$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012199else
12200 ac_check_lib_save_LIBS=$LIBS
12201LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012203/* end confdefs.h. */
12204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205/* Override any GCC internal prototype to avoid an error.
12206 Use char because int might match the return type of a GCC
12207 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012208#ifdef __cplusplus
12209extern "C"
12210#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211char forkpty ();
12212int
12213main ()
12214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012216 ;
12217 return 0;
12218}
12219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012221 ac_cv_lib_bsd_forkpty=yes
12222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012225rm -f core conftest.err conftest.$ac_objext \
12226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227LIBS=$ac_check_lib_save_LIBS
12228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12230$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012231if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012233 LIBS="$LIBS -lbsd"
12234fi
12235
12236
12237fi
12238
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239
12240fi
12241done
12242
Jack Jansendd19cf82001-12-06 22:36:17 +000012243
Christian Heimesb186d002008-03-18 15:15:01 +000012244# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012245for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012246do :
12247 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012248if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012249 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012250#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012251_ACEOF
12252
12253fi
12254done
12255
12256
Michael W. Hudson54241132001-12-07 15:38:26 +000012257# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012258for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012259do :
12260 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12261ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012262if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012265_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012267fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012268done
12269
Michael W. Hudson54241132001-12-07 15:38:26 +000012270
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012271ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012272if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012273 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012274
Martin v. Löwis1142de32002-03-29 16:28:31 +000012275else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012277 *" dup2.$ac_objext "* ) ;;
12278 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012280esac
12281
Martin v. Löwis1142de32002-03-29 16:28:31 +000012282fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012283
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012284ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012285if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012286 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12287
12288else
12289 case " $LIBOBJS " in
12290 *" strdup.$ac_objext "* ) ;;
12291 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12292 ;;
12293esac
12294
12295fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012296
12297
12298for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012299do :
12300 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012301if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012303#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012306/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012307#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012308int
12309main ()
12310{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012311getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 ;
12313 return 0;
12314}
12315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012317
Matthias Kloseb9621712010-04-24 17:59:49 +000012318$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012319
Guido van Rossum627b2d71993-12-24 10:39:16 +000012320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012322
Guido van Rossum627b2d71993-12-24 10:39:16 +000012323fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012324done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012325
Jack Jansen150753c2003-03-29 22:07:47 +000012326for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012327do :
12328 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012329if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012330 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012331#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012334/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012335#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012336int
12337main ()
12338{
12339setpgrp(0,0);
12340 ;
12341 return 0;
12342}
12343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012345
Matthias Kloseb9621712010-04-24 17:59:49 +000012346$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012347
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012350
12351fi
12352done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012353
Thomas Wouters3a584202000-08-05 23:28:51 +000012354for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012355do :
12356 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012357if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012362/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012363#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012364int
12365main ()
12366{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012367gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 ;
12369 return 0;
12370}
12371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012372if ac_fn_c_try_compile "$LINENO"; then :
12373
Guido van Rossum627b2d71993-12-24 10:39:16 +000012374else
Skip Montanaro6dead952003-09-25 14:50:04 +000012375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012377
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
Guido van Rossum627b2d71993-12-24 10:39:16 +000012379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012382fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012383done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012384
Michael W. Hudson54241132001-12-07 15:38:26 +000012385
Victor Stinnere0be4232011-10-25 13:06:09 +020012386for ac_func in clock_gettime
12387do :
12388 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12389if test "x$ac_cv_func_clock_gettime" = xyes; then :
12390 cat >>confdefs.h <<_ACEOF
12391#define HAVE_CLOCK_GETTIME 1
12392_ACEOF
12393
12394else
12395
12396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12397$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12398if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12399 $as_echo_n "(cached) " >&6
12400else
12401 ac_check_lib_save_LIBS=$LIBS
12402LIBS="-lrt $LIBS"
12403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12404/* end confdefs.h. */
12405
12406/* Override any GCC internal prototype to avoid an error.
12407 Use char because int might match the return type of a GCC
12408 builtin and then its argument prototype would still apply. */
12409#ifdef __cplusplus
12410extern "C"
12411#endif
12412char clock_gettime ();
12413int
12414main ()
12415{
12416return clock_gettime ();
12417 ;
12418 return 0;
12419}
12420_ACEOF
12421if ac_fn_c_try_link "$LINENO"; then :
12422 ac_cv_lib_rt_clock_gettime=yes
12423else
12424 ac_cv_lib_rt_clock_gettime=no
12425fi
12426rm -f core conftest.err conftest.$ac_objext \
12427 conftest$ac_exeext conftest.$ac_ext
12428LIBS=$ac_check_lib_save_LIBS
12429fi
12430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12431$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12432if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12433
Victor Stinner7efb8332014-08-29 15:41:08 +020012434 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012435 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12436
12437
12438$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12439
12440
12441fi
12442
12443
12444fi
12445done
12446
12447
12448for ac_func in clock_getres
12449do :
12450 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12451if test "x$ac_cv_func_clock_getres" = xyes; then :
12452 cat >>confdefs.h <<_ACEOF
12453#define HAVE_CLOCK_GETRES 1
12454_ACEOF
12455
12456else
12457
12458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12459$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12460if ${ac_cv_lib_rt_clock_getres+:} false; then :
12461 $as_echo_n "(cached) " >&6
12462else
12463 ac_check_lib_save_LIBS=$LIBS
12464LIBS="-lrt $LIBS"
12465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12466/* end confdefs.h. */
12467
12468/* Override any GCC internal prototype to avoid an error.
12469 Use char because int might match the return type of a GCC
12470 builtin and then its argument prototype would still apply. */
12471#ifdef __cplusplus
12472extern "C"
12473#endif
12474char clock_getres ();
12475int
12476main ()
12477{
12478return clock_getres ();
12479 ;
12480 return 0;
12481}
12482_ACEOF
12483if ac_fn_c_try_link "$LINENO"; then :
12484 ac_cv_lib_rt_clock_getres=yes
12485else
12486 ac_cv_lib_rt_clock_getres=no
12487fi
12488rm -f core conftest.err conftest.$ac_objext \
12489 conftest$ac_exeext conftest.$ac_ext
12490LIBS=$ac_check_lib_save_LIBS
12491fi
12492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12493$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12494if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12495
12496 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12497
12498
12499fi
12500
12501
12502fi
12503done
12504
12505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12507$as_echo_n "checking for major... " >&6; }
12508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012509/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012510
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012511#if defined(MAJOR_IN_MKDEV)
12512#include <sys/mkdev.h>
12513#elif defined(MAJOR_IN_SYSMACROS)
12514#include <sys/sysmacros.h>
12515#else
12516#include <sys/types.h>
12517#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012518
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012519int
12520main ()
12521{
12522
12523 makedev(major(0),minor(0));
12524
12525 ;
12526 return 0;
12527}
12528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012530
12531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012533
Matthias Kloseb9621712010-04-24 17:59:49 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12535$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012536
12537else
Skip Montanaro6dead952003-09-25 14:50:04 +000012538
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12540$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012541
12542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012543rm -f core conftest.err conftest.$ac_objext \
12544 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012545
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012546# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012547# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12549$as_echo_n "checking for getaddrinfo... " >&6; }
12550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012551/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012552
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012553#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012554#include <sys/socket.h>
12555#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012556#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012557
Martin v. Löwis11437992002-04-12 09:54:03 +000012558int
12559main ()
12560{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012561getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012562 ;
12563 return 0;
12564}
12565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012566if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012567 have_getaddrinfo=yes
12568else
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012571rm -f core conftest.err conftest.$ac_objext \
12572 conftest$ac_exeext conftest.$ac_ext
12573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12574$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012575if test $have_getaddrinfo = yes
12576then
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12578$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012579 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012581else
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012583
12584if test "${enable_ipv6+set}" = set; then
12585 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12586else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012587 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012588fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012589else
Matthias Kloseb9621712010-04-24 17:59:49 +000012590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012591/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012592
Stefan Krah19c21392012-11-22 23:47:32 +010012593#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012594#include <sys/types.h>
12595#include <netdb.h>
12596#include <string.h>
12597#include <sys/socket.h>
12598#include <netinet/in.h>
12599
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012600int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012601{
12602 int passive, gaierr, inet4 = 0, inet6 = 0;
12603 struct addrinfo hints, *ai, *aitop;
12604 char straddr[INET6_ADDRSTRLEN], strport[16];
12605
12606 for (passive = 0; passive <= 1; passive++) {
12607 memset(&hints, 0, sizeof(hints));
12608 hints.ai_family = AF_UNSPEC;
12609 hints.ai_flags = passive ? AI_PASSIVE : 0;
12610 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012611 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012612 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12613 (void)gai_strerror(gaierr);
12614 goto bad;
12615 }
12616 for (ai = aitop; ai; ai = ai->ai_next) {
12617 if (ai->ai_addr == NULL ||
12618 ai->ai_addrlen == 0 ||
12619 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12620 straddr, sizeof(straddr), strport, sizeof(strport),
12621 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12622 goto bad;
12623 }
12624 switch (ai->ai_family) {
12625 case AF_INET:
12626 if (strcmp(strport, "54321") != 0) {
12627 goto bad;
12628 }
12629 if (passive) {
12630 if (strcmp(straddr, "0.0.0.0") != 0) {
12631 goto bad;
12632 }
12633 } else {
12634 if (strcmp(straddr, "127.0.0.1") != 0) {
12635 goto bad;
12636 }
12637 }
12638 inet4++;
12639 break;
12640 case AF_INET6:
12641 if (strcmp(strport, "54321") != 0) {
12642 goto bad;
12643 }
12644 if (passive) {
12645 if (strcmp(straddr, "::") != 0) {
12646 goto bad;
12647 }
12648 } else {
12649 if (strcmp(straddr, "::1") != 0) {
12650 goto bad;
12651 }
12652 }
12653 inet6++;
12654 break;
12655 case AF_UNSPEC:
12656 goto bad;
12657 break;
12658 default:
12659 /* another family support? */
12660 break;
12661 }
12662 }
12663 }
12664
12665 if (!(inet4 == 0 || inet4 == 2))
12666 goto bad;
12667 if (!(inet6 == 0 || inet6 == 2))
12668 goto bad;
12669
12670 if (aitop)
12671 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012672 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012673
12674 bad:
12675 if (aitop)
12676 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012677 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012678}
12679
Martin v. Löwis11437992002-04-12 09:54:03 +000012680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012682 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012683else
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012690fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012691
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12695$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12696
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012697if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012698then
12699 if test $ipv6 = yes
12700 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701 echo 'Fatal: You must get working getaddrinfo() function.'
12702 echo ' or you can specify "--disable-ipv6"'.
12703 exit 1
12704 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012705else
Martin v. Löwis11437992002-04-12 09:54:03 +000012706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012708
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012709fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012710
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012711for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012712do :
12713 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012714if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012716#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012717_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012718
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012719fi
12720done
12721
Michael W. Hudson54241132001-12-07 15:38:26 +000012722
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12725$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012726if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012730/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012731#include <sys/types.h>
12732#include <sys/time.h>
12733#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Martin v. Löwis11437992002-04-12 09:54:03 +000012735int
12736main ()
12737{
12738if ((struct tm *) 0)
12739return 0;
12740 ;
12741 return 0;
12742}
12743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012744if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012746else
Matthias Kloseb9621712010-04-24 17:59:49 +000012747 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12752$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012753if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012756
12757fi
12758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12760$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012761if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763else
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012766#include <sys/types.h>
12767#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012768
Martin v. Löwis11437992002-04-12 09:54:03 +000012769int
12770main ()
12771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772struct tm tm;
12773 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 ;
12776 return 0;
12777}
12778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012779if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012780 ac_cv_struct_tm=time.h
12781else
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12787$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012788if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012789
Matthias Kloseb9621712010-04-24 17:59:49 +000012790$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791
12792fi
12793
Matthias Kloseb9621712010-04-24 17:59:49 +000012794ac_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 +000012795#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797"
Victor Stinnere0be4232011-10-25 13:06:09 +020012798if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
12800cat >>confdefs.h <<_ACEOF
12801#define HAVE_STRUCT_TM_TM_ZONE 1
12802_ACEOF
12803
12804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012806
Martin v. Löwis11437992002-04-12 09:54:03 +000012807if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012810
12811else
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12813"
Victor Stinnere0be4232011-10-25 13:06:09 +020012814if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012816else
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012818fi
12819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012821#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012822_ACEOF
12823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12825$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012826if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828else
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012830/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012831#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012832#if !HAVE_DECL_TZNAME
12833extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012835
Martin v. Löwis11437992002-04-12 09:54:03 +000012836int
12837main ()
12838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 ;
12841 return 0;
12842}
12843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012844if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012845 ac_cv_var_tzname=yes
12846else
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012849rm -f core conftest.err conftest.$ac_objext \
12850 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12853$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012854 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012857
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012858 fi
12859fi
12860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861ac_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 +020012862if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012863
12864cat >>confdefs.h <<_ACEOF
12865#define HAVE_STRUCT_STAT_ST_RDEV 1
12866_ACEOF
12867
12868
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012869fi
12870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871ac_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 +020012872if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012873
Martin v. Löwis11437992002-04-12 09:54:03 +000012874cat >>confdefs.h <<_ACEOF
12875#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12876_ACEOF
12877
12878
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012879fi
12880
Matthias Kloseb9621712010-04-24 17:59:49 +000012881ac_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 +020012882if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012883
12884cat >>confdefs.h <<_ACEOF
12885#define HAVE_STRUCT_STAT_ST_FLAGS 1
12886_ACEOF
12887
12888
12889fi
12890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891ac_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 +020012892if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012893
12894cat >>confdefs.h <<_ACEOF
12895#define HAVE_STRUCT_STAT_ST_GEN 1
12896_ACEOF
12897
12898
12899fi
12900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901ac_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 +020012902if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012903
12904cat >>confdefs.h <<_ACEOF
12905#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12906_ACEOF
12907
12908
12909fi
12910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911ac_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 +020012912if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012913
Martin v. Löwis11437992002-04-12 09:54:03 +000012914cat >>confdefs.h <<_ACEOF
12915#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12916_ACEOF
12917
12918
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012919fi
12920
Stefan Krah267b6392016-04-26 01:09:18 +020012921ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12922 #include <sys/types.h>
12923 #include <pwd.h>
12924
12925"
12926if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12927
12928cat >>confdefs.h <<_ACEOF
12929#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12930_ACEOF
12931
12932
12933fi
12934ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12935 #include <sys/types.h>
12936 #include <pwd.h>
12937
12938"
12939if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12940
12941cat >>confdefs.h <<_ACEOF
12942#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12943_ACEOF
12944
12945
12946fi
12947
Michael W. Hudson54241132001-12-07 15:38:26 +000012948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12950$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012951if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953else
Matthias Kloseb159a552010-04-25 21:00:44 +000012954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012956/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012957#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012958int
12959main ()
12960{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012961return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 ;
12963 return 0;
12964}
12965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012966if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967 ac_cv_header_time_altzone=yes
12968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012973fi
12974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12976$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012977if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012978
Matthias Kloseb9621712010-04-24 17:59:49 +000012979$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012980
12981fi
12982
Guido van Rossumda88dad1995-01-26 00:46:29 +000012983was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12985$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012987/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012988
12989#include <sys/types.h>
12990#include <sys/select.h>
12991#include <sys/time.h>
12992
Martin v. Löwis11437992002-04-12 09:54:03 +000012993int
12994main ()
12995{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996;
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013002
13003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013006 was_it_defined=yes
13007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13011$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13014$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013015if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013017else
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013019/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013020#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013021int
13022main ()
13023{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 ;
13026 return 0;
13027}
13028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013030 ac_cv_struct_addrinfo=yes
13031else
Matthias Kloseb9621712010-04-24 17:59:49 +000013032 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13035fi
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13038$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013042
13043fi
13044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13046$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013047if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013051/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013052
13053# include <sys/types.h>
13054# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013055int
13056main ()
13057{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013058struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 ;
13060 return 0;
13061}
13062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013063if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013064 ac_cv_struct_sockaddr_storage=yes
13065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13069fi
13070
Matthias Kloseb9621712010-04-24 17:59:49 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13072$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013073if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013076
13077fi
13078
Guido van Rossum627b2d71993-12-24 10:39:16 +000013079# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13082$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013083if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013085else
Matthias Kloseb9621712010-04-24 17:59:49 +000013086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013088$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013089int
13090main ()
13091{
13092static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013093test_array [0] = 0;
13094return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013095
13096 ;
13097 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013098}
Martin v. Löwis11437992002-04-12 09:54:03 +000013099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013100if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013101 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13108$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013109if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111
13112fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13115$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013116if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013118else
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013120/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013121
Martin v. Löwis11437992002-04-12 09:54:03 +000013122int
13123main ()
13124{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013125
Martin v. Löwis11437992002-04-12 09:54:03 +000013126#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013127 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013129 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131 char const *const *pcpcc;
13132 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013133 /* NEC SVR4.0.2 mips cc rejects this. */
13134 struct point {int x, y;};
13135 static struct point const zero = {0,0};
13136 /* AIX XL C 1.02.0.0 rejects this.
13137 It does not let you subtract one const X* pointer from another in
13138 an arm of an if-expression whose if-part is not a constant
13139 expression */
13140 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143 ++pcpcc;
13144 ppc = (char**) pcpcc;
13145 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013146 { /* SCO 3.2v4 cc rejects this sort of thing. */
13147 char tx;
13148 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013150
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013152 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 }
13154 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13155 int x[] = {25, 17};
13156 const int *foo = &x[0];
13157 ++foo;
13158 }
13159 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13160 typedef const int *iptr;
13161 iptr p = 0;
13162 ++p;
13163 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013164 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013166 struct s { int j; const int *ap[3]; } bx;
13167 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 }
13169 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13170 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013174#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013175
Martin v. Löwis11437992002-04-12 09:54:03 +000013176 ;
13177 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013178}
Martin v. Löwis11437992002-04-12 09:54:03 +000013179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013180if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013181 ac_cv_c_const=yes
13182else
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13188$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013189if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013192
13193fi
13194
Michael W. Hudson54241132001-12-07 15:38:26 +000013195
Guido van Rossumda88dad1995-01-26 00:46:29 +000013196works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13198$as_echo_n "checking for working volatile... " >&6; }
13199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013200/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013201
Martin v. Löwis11437992002-04-12 09:54:03 +000013202int
13203main ()
13204{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013205volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013206 ;
13207 return 0;
13208}
13209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013210if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013211 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013212else
Skip Montanaro6dead952003-09-25 14:50:04 +000013213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013215
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013216
Guido van Rossum627b2d71993-12-24 10:39:16 +000013217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13220$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013221
Guido van Rossumda88dad1995-01-26 00:46:29 +000013222works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13224$as_echo_n "checking for working signed char... " >&6; }
13225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013226/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228int
13229main ()
13230{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013231signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 ;
13233 return 0;
13234}
13235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013236if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013237 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013238else
Skip Montanaro6dead952003-09-25 14:50:04 +000013239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013241
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013242
Guido van Rossum7f43da71994-08-01 12:15:30 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13246$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013247
Guido van Rossumda88dad1995-01-26 00:46:29 +000013248have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13250$as_echo_n "checking for prototypes... " >&6; }
13251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013252/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013253int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013254int
13255main ()
13256{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013257return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 ;
13259 return 0;
13260}
13261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
Matthias Kloseb9621712010-04-24 17:59:49 +000013264$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013265
Matthias Kloseb159a552010-04-25 21:00:44 +000013266 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13270$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013271
Guido van Rossumda88dad1995-01-26 00:46:29 +000013272works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13274$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013276/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013277
13278#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013279int foo(int x, ...) {
13280 va_list va;
13281 va_start(va, x);
13282 va_arg(va, int);
13283 va_arg(va, char *);
13284 va_arg(va, double);
13285 return 0;
13286}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013287
Martin v. Löwis11437992002-04-12 09:54:03 +000013288int
13289main ()
13290{
Guido van Rossum90eea071996-08-30 20:58:57 +000013291return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 ;
13293 return 0;
13294}
13295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013297
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013301 works=yes
13302
Guido van Rossum627b2d71993-12-24 10:39:16 +000013303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13306$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013307
Martin v. Löwisd6320502004-08-12 13:45:08 +000013308# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13310$as_echo_n "checking for socketpair... " >&6; }
13311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013312/* end confdefs.h. */
13313
13314#include <sys/types.h>
13315#include <sys/socket.h>
13316
13317int
13318main ()
13319{
13320void *x=socketpair
13321 ;
13322 return 0;
13323}
13324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013328
Matthias Kloseb159a552010-04-25 21:00:44 +000013329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013330$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13333$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013334
13335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013337
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013338# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13340$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013342/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013343#include <sys/types.h>
13344#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013345int
13346main ()
13347{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013348struct sockaddr x;
13349x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 ;
13351 return 0;
13352}
13353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013354if ac_fn_c_try_compile "$LINENO"; then :
13355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13356$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013359
13360else
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13362$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013363
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013366
Guido van Rossumda88dad1995-01-26 00:46:29 +000013367va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13369$as_echo_n "checking whether va_list is an array... " >&6; }
13370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013371/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013372
13373#ifdef HAVE_STDARG_PROTOTYPES
13374#include <stdarg.h>
13375#else
13376#include <varargs.h>
13377#endif
13378
Martin v. Löwis11437992002-04-12 09:54:03 +000013379int
13380main ()
13381{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 ;
13384 return 0;
13385}
13386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013387if ac_fn_c_try_compile "$LINENO"; then :
13388
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389else
Skip Montanaro6dead952003-09-25 14:50:04 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013393
Guido van Rossumda88dad1995-01-26 00:46:29 +000013394 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013395
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13399$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013401# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
13403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013405if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13410$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013411 OLD_CFLAGS=$CFLAGS
13412 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013414/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013415
13416# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Martin v. Löwis11437992002-04-12 09:54:03 +000013418int
13419main ()
13420{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013421
13422 char *name;
13423 struct hostent *he, *res;
13424 char buffer[2048];
13425 int buflen = 2048;
13426 int h_errnop;
13427
13428 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
13430 ;
13431 return 0;
13432}
13433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013437
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13442$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013444else
Skip Montanaro6dead952003-09-25 14:50:04 +000013445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13447$as_echo "no" >&6; }
13448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13449$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013451/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013453# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Martin v. Löwis11437992002-04-12 09:54:03 +000013455int
13456main ()
13457{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013458
13459 char *name;
13460 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013461 char buffer[2048];
13462 int buflen = 2048;
13463 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013464
Matthias Kloseb159a552010-04-25 21:00:44 +000013465 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013466
13467 ;
13468 return 0;
13469}
13470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013471if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475
Matthias Kloseb159a552010-04-25 21:00:44 +000013476$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13479$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013481else
Skip Montanaro6dead952003-09-25 14:50:04 +000013482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13484$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13486$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13488/* end confdefs.h. */
13489
13490# include <netdb.h>
13491
13492int
13493main ()
13494{
13495
13496 char *name;
13497 struct hostent *he;
13498 struct hostent_data data;
13499
13500 (void) gethostbyname_r(name, he, &data);
13501
13502 ;
13503 return 0;
13504}
13505_ACEOF
13506if ac_fn_c_try_compile "$LINENO"; then :
13507
13508 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13509
13510
13511$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13512
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13514$as_echo "yes" >&6; }
13515
13516else
13517
13518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13519$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013529 CFLAGS=$OLD_CFLAGS
13530
13531else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 for ac_func in gethostbyname
13534do :
13535 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013536if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013539_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013540
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013541fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013542done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013543
Michael W. Hudson54241132001-12-07 15:38:26 +000013544
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013545fi
13546
Michael W. Hudson54241132001-12-07 15:38:26 +000013547
13548
13549
13550
13551
13552
Guido van Rossum627b2d71993-12-24 10:39:16 +000013553# checks for system services
13554# (none yet)
13555
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013557ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013558if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013559
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13562$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013563if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565else
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013567LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571/* Override any GCC internal prototype to avoid an error.
13572 Use char because int might match the return type of a GCC
13573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013574#ifdef __cplusplus
13575extern "C"
13576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013577char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013578int
13579main ()
13580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
13584}
13585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013587 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013591rm -f core conftest.err conftest.$ac_objext \
13592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013593LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13596$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013597if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 cat >>confdefs.h <<_ACEOF
13599#define HAVE_LIBIEEE 1
13600_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013602 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013603
Guido van Rossum627b2d71993-12-24 10:39:16 +000013604fi
13605
Michael W. Hudson54241132001-12-07 15:38:26 +000013606
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013607fi
13608
Michael W. Hudson54241132001-12-07 15:38:26 +000013609
Guido van Rossum7f253911997-05-09 02:42:48 +000013610# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13612$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013617if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013618then
13619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13623$as_echo "yes" >&6; }
13624else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13625$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013626fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13629$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630fi
13631
Guido van Rossum7f253911997-05-09 02:42:48 +000013632
Guido van Rossum7f43da71994-08-01 12:15:30 +000013633# check for --with-libm=...
13634
Guido van Rossum563e7081996-09-10 18:20:48 +000013635case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013636Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013637*) LIBM=-lm
13638esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13640$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013643if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013644 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013645if test "$withval" = no
13646then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13648$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013649elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013650then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13652$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013653else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013654fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13657$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658fi
13659
Guido van Rossum7f43da71994-08-01 12:15:30 +000013660
13661# check for --with-libc=...
13662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13664$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013667if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013669if test "$withval" = no
13670then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13672$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013673elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013674then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13676$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013677else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013678fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13681$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013682fi
13683
Guido van Rossum7f43da71994-08-01 12:15:30 +000013684
Stefan Krah1919b7e2012-03-21 18:25:23 +010013685# **************************************
13686# * Check for gcc x64 inline assembler *
13687# **************************************
13688
13689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13690$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13692/* end confdefs.h. */
13693
13694int
13695main ()
13696{
13697
13698 __asm__ __volatile__ ("movq %rcx, %rax");
13699
13700 ;
13701 return 0;
13702}
13703_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013704if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013705 have_gcc_asm_for_x64=yes
13706else
13707 have_gcc_asm_for_x64=no
13708fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013709rm -f core conftest.err conftest.$ac_objext \
13710 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13712$as_echo "$have_gcc_asm_for_x64" >&6; }
13713if test "$have_gcc_asm_for_x64" = yes
13714then
13715
13716$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13717
13718fi
13719
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013720# **************************************************
13721# * Check for various properties of floating point *
13722# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13725$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013726if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013728else
13729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013731 ac_cv_little_endian_double=no
13732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013734/* end confdefs.h. */
13735
13736#include <string.h>
13737int main() {
13738 double x = 9006104071832581.0;
13739 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13740 return 0;
13741 else
13742 return 1;
13743}
13744
13745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013746if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013747 ac_cv_little_endian_double=yes
13748else
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013753fi
13754
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013755fi
13756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13758$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013759if test "$ac_cv_little_endian_double" = yes
13760then
13761
Matthias Kloseb9621712010-04-24 17:59:49 +000013762$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013763
13764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13767$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013768if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013770else
13771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013773 ac_cv_big_endian_double=no
13774else
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776/* end confdefs.h. */
13777
13778#include <string.h>
13779int main() {
13780 double x = 9006104071832581.0;
13781 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13782 return 0;
13783 else
13784 return 1;
13785}
13786
13787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013788if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013789 ac_cv_big_endian_double=yes
13790else
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013795fi
13796
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013797fi
13798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13800$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013801if test "$ac_cv_big_endian_double" = yes
13802then
13803
Matthias Kloseb9621712010-04-24 17:59:49 +000013804$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013805
13806fi
13807
13808# Some ARM platforms use a mixed-endian representation for doubles.
13809# While Python doesn't currently have full support for these platforms
13810# (see e.g., issue 1762561), we can at least make sure that float <-> string
13811# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13813$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013814if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013815 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816else
13817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819 ac_cv_mixed_endian_double=no
13820else
Matthias Kloseb9621712010-04-24 17:59:49 +000013821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013822/* end confdefs.h. */
13823
13824#include <string.h>
13825int main() {
13826 double x = 9006104071832581.0;
13827 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13828 return 0;
13829 else
13830 return 1;
13831}
13832
13833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013834if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013835 ac_cv_mixed_endian_double=yes
13836else
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13840 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013841fi
13842
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013843fi
13844
Matthias Kloseb9621712010-04-24 17:59:49 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13846$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013847if test "$ac_cv_mixed_endian_double" = yes
13848then
13849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013851
13852fi
13853
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013854# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013855# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013856# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013857# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013858# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013859# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013860
13861# This inline assembler syntax may also work for suncc and icc,
13862# so we try it on all platforms.
13863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13865$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867/* end confdefs.h. */
13868
13869int
13870main ()
13871{
13872
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013873 unsigned short cw;
13874 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13875 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876
13877 ;
13878 return 0;
13879}
13880_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013881if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882 have_gcc_asm_for_x87=yes
13883else
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013885fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013886rm -f core conftest.err conftest.$ac_objext \
13887 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13889$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013890if test "$have_gcc_asm_for_x87" = yes
13891then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892
Matthias Kloseb9621712010-04-24 17:59:49 +000013893$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013894
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013896
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13898$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13900/* end confdefs.h. */
13901
13902int
13903main ()
13904{
13905
13906 unsigned int fpcr;
13907 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13908 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13909
13910 ;
13911 return 0;
13912}
13913_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013914if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013915 have_gcc_asm_for_mc68881=yes
13916else
13917 have_gcc_asm_for_mc68881=no
13918fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013919rm -f core conftest.err conftest.$ac_objext \
13920 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13922$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13923if test "$have_gcc_asm_for_mc68881" = yes
13924then
13925
13926$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13927
13928fi
13929
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013930# Detect whether system arithmetic is subject to x87-style double
13931# rounding issues. The result of this test has little meaning on non
13932# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13933# mode is round-to-nearest and double rounding issues are present, and
13934# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13936$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013937# $BASECFLAGS may affect the result
13938ac_save_cc="$CC"
13939CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013940if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013941 ac_cv_x87_double_rounding=no
13942else
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013944/* end confdefs.h. */
13945
13946#include <stdlib.h>
13947#include <math.h>
13948int main() {
13949 volatile double x, y, z;
13950 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13951 x = 0.99999999999999989; /* 1-2**-53 */
13952 y = 1./x;
13953 if (y != 1.)
13954 exit(0);
13955 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13956 x = 1e16;
13957 y = 2.99999;
13958 z = x + y;
13959 if (z != 1e16+4.)
13960 exit(0);
13961 /* both tests show evidence of double rounding */
13962 exit(1);
13963}
13964
13965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013966if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013967 ac_cv_x87_double_rounding=no
13968else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013973fi
13974
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013975CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13977$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013978if test "$ac_cv_x87_double_rounding" = yes
13979then
13980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013982
13983fi
13984
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013985# ************************************
13986# * Check for mathematical functions *
13987# ************************************
13988
13989LIBS_SAVE=$LIBS
13990LIBS="$LIBS $LIBM"
13991
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013992for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13993do :
13994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13995ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013996if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013997 cat >>confdefs.h <<_ACEOF
13998#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13999_ACEOF
14000
14001fi
14002done
14003
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014004for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014005do :
14006 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14007ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014008if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014009 cat >>confdefs.h <<_ACEOF
14010#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14011_ACEOF
14012
14013fi
14014done
14015
14016ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14017"
Victor Stinnere0be4232011-10-25 13:06:09 +020014018if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014019 ac_have_decl=1
14020else
14021 ac_have_decl=0
14022fi
14023
14024cat >>confdefs.h <<_ACEOF
14025#define HAVE_DECL_ISINF $ac_have_decl
14026_ACEOF
14027ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14028"
Victor Stinnere0be4232011-10-25 13:06:09 +020014029if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014030 ac_have_decl=1
14031else
14032 ac_have_decl=0
14033fi
14034
14035cat >>confdefs.h <<_ACEOF
14036#define HAVE_DECL_ISNAN $ac_have_decl
14037_ACEOF
14038ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14039"
Victor Stinnere0be4232011-10-25 13:06:09 +020014040if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014041 ac_have_decl=1
14042else
14043 ac_have_decl=0
14044fi
14045
14046cat >>confdefs.h <<_ACEOF
14047#define HAVE_DECL_ISFINITE $ac_have_decl
14048_ACEOF
14049
14050
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014051# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14052# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14054$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014055if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014056 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014057else
14058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014060 ac_cv_tanh_preserves_zero_sign=no
14061else
Matthias Kloseb9621712010-04-24 17:59:49 +000014062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014063/* end confdefs.h. */
14064
14065#include <math.h>
14066#include <stdlib.h>
14067int main() {
14068 /* return 0 if either negative zeros don't exist
14069 on this platform or if negative zeros exist
14070 and tanh(-0.) == -0. */
14071 if (atan2(0., -1.) == atan2(-0., -1.) ||
14072 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14073 else exit(1);
14074}
14075
14076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014077if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014078 ac_cv_tanh_preserves_zero_sign=yes
14079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14083 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014084fi
14085
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014086fi
14087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14089$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014090if test "$ac_cv_tanh_preserves_zero_sign" = yes
14091then
14092
Matthias Kloseb9621712010-04-24 17:59:49 +000014093$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014094
14095fi
14096
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014097if test "$ac_cv_func_log1p" = yes
14098then
14099 # On some versions of AIX, log1p(-0.) returns 0. instead of
14100 # -0. See issue #9920.
14101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14102$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014103 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014104 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014105else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014106
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014107 if test "$cross_compiling" = yes; then :
14108 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014109else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14111/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014112
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014113 #include <math.h>
14114 #include <stdlib.h>
14115 int main() {
14116 /* Fail if the signs of log1p(-0.) and -0. can be
14117 distinguished. */
14118 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14119 return 0;
14120 else
14121 return 1;
14122 }
14123
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014124_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014125if ac_fn_c_try_run "$LINENO"; then :
14126 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014127else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014128 ac_cv_log1p_drops_zero_sign=yes
14129fi
14130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014132fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014133
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014134fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014135
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14137$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14138fi
14139if test "$ac_cv_log1p_drops_zero_sign" = yes
14140then
14141
14142$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14143
14144fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014145
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014146LIBS=$LIBS_SAVE
14147
Mark Dickinsona614f042009-11-28 12:48:43 +000014148# For multiprocessing module, check that sem_open
14149# actually works. For FreeBSD versions <= 7.2,
14150# the kernel module that provides POSIX semaphores
14151# isn't loaded by default, so an attempt to call
14152# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14154$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014155if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014157else
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014159 ac_cv_posix_semaphores_enabled=yes
14160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014162/* end confdefs.h. */
14163
14164#include <unistd.h>
14165#include <fcntl.h>
14166#include <stdio.h>
14167#include <semaphore.h>
14168#include <sys/stat.h>
14169
14170int main(void) {
14171 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14172 if (a == SEM_FAILED) {
14173 perror("sem_open");
14174 return 1;
14175 }
14176 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014177 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014178 return 0;
14179}
14180
14181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014183 ac_cv_posix_semaphores_enabled=yes
14184else
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014189fi
14190
14191
Mark Dickinsona614f042009-11-28 12:48:43 +000014192fi
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14195$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014196if test $ac_cv_posix_semaphores_enabled = no
14197then
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014200
14201fi
14202
Mark Dickinson10683072009-04-18 21:18:19 +000014203# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14205$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014206if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014210 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014213/* end confdefs.h. */
14214
14215#include <unistd.h>
14216#include <fcntl.h>
14217#include <stdio.h>
14218#include <semaphore.h>
14219#include <sys/stat.h>
14220
14221int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014222 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014223 int count;
14224 int res;
14225 if(a==SEM_FAILED){
14226 perror("sem_open");
14227 return 1;
14228
14229 }
14230 res = sem_getvalue(a, &count);
14231 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014232 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014233 return res==-1 ? 1 : 0;
14234}
14235
Mark Dickinson10683072009-04-18 21:18:19 +000014236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014237if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014238 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014239else
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014244fi
14245
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247fi
14248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14250$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014251if test $ac_cv_broken_sem_getvalue = yes
14252then
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014255
14256fi
14257
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014258ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14259"
14260if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14261 ac_have_decl=1
14262else
14263 ac_have_decl=0
14264fi
14265
14266cat >>confdefs.h <<_ACEOF
14267#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14268_ACEOF
14269ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14270"
14271if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14272 ac_have_decl=1
14273else
14274 ac_have_decl=0
14275fi
14276
14277cat >>confdefs.h <<_ACEOF
14278#define HAVE_DECL_RTLD_NOW $ac_have_decl
14279_ACEOF
14280ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14281"
14282if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14283 ac_have_decl=1
14284else
14285 ac_have_decl=0
14286fi
14287
14288cat >>confdefs.h <<_ACEOF
14289#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14290_ACEOF
14291ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14292"
14293if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14294 ac_have_decl=1
14295else
14296 ac_have_decl=0
14297fi
14298
14299cat >>confdefs.h <<_ACEOF
14300#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14301_ACEOF
14302ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14303"
14304if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14305 ac_have_decl=1
14306else
14307 ac_have_decl=0
14308fi
14309
14310cat >>confdefs.h <<_ACEOF
14311#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14312_ACEOF
14313ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14314"
14315if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14316 ac_have_decl=1
14317else
14318 ac_have_decl=0
14319fi
14320
14321cat >>confdefs.h <<_ACEOF
14322#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14323_ACEOF
14324ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14325"
14326if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14327 ac_have_decl=1
14328else
14329 ac_have_decl=0
14330fi
14331
14332cat >>confdefs.h <<_ACEOF
14333#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14334_ACEOF
14335
14336
Mark Dickinsonbd792642009-03-18 20:06:12 +000014337# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14339$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014340# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014341if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014342 enableval=$enable_big_digits; case $enable_big_digits in
14343yes)
14344 enable_big_digits=30 ;;
14345no)
14346 enable_big_digits=15 ;;
1434715|30)
14348 ;;
14349*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014350 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 +000014351esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14353$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014354
14355cat >>confdefs.h <<_ACEOF
14356#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14357_ACEOF
14358
14359
14360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14362$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014363fi
14364
14365
Guido van Rossumef2255b2000-03-10 22:30:29 +000014366# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014367ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014368if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014373 wchar_h="yes"
14374
Guido van Rossumef2255b2000-03-10 22:30:29 +000014375else
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014377
14378fi
14379
Michael W. Hudson54241132001-12-07 15:38:26 +000014380
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014382# determine wchar_t size
14383if test "$wchar_h" = yes
14384then
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14388# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14390$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014391if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014393else
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14395"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Martin v. Löwis11437992002-04-12 09:54:03 +000014397else
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 if test "$ac_cv_type_wchar_t" = yes; then
14399 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14400$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014401as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014402See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403 else
14404 ac_cv_sizeof_wchar_t=0
14405 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014407
Martin v. Löwis11437992002-04-12 09:54:03 +000014408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14410$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014411
14412
14413
Martin v. Löwis11437992002-04-12 09:54:03 +000014414cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014415#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014416_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014417
Michael W. Hudson54241132001-12-07 15:38:26 +000014418
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014419fi
14420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14422$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014423have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014425/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014426
14427#include <tcl.h>
14428#if TCL_UTF_MAX != 6
14429# error "NOT UCS4_TCL"
14430#endif
14431int
14432main ()
14433{
14434
14435 ;
14436 return 0;
14437}
14438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014440
14441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014443
14444 have_ucs4_tcl=yes
14445
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14449$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014450
Skip Montanaro6dead952003-09-25 14:50:04 +000014451# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014452if test "$wchar_h" = yes
14453then
14454 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14456$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014457 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014459else
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014462 ac_cv_wchar_t_signed=yes
14463else
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014465/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014466
14467 #include <wchar.h>
14468 int main()
14469 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014470 /* Success: exit code 0 */
14471 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014472 }
14473
14474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014475if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014476 ac_cv_wchar_t_signed=yes
14477else
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014482fi
14483
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014484fi
14485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14487$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488fi
14489
Georg Brandl52d168a2008-01-07 18:10:24 +000014490# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014491if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014492 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014493then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014494 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
Georg Brandl52d168a2008-01-07 18:10:24 +000014498else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014499 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014500fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14502$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014503
14504# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14506$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014507if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014509else
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 ac_cv_c_bigendian=unknown
14511 # See if we're dealing with a universal compiler.
14512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14513/* end confdefs.h. */
14514#ifndef __APPLE_CC__
14515 not a universal capable compiler
14516 #endif
14517 typedef int dummy;
14518
Skip Montanaro6dead952003-09-25 14:50:04 +000014519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014520if ac_fn_c_try_compile "$LINENO"; then :
14521
14522 # Check for potential -arch flags. It is not universal unless
14523 # there are at least two -arch flags with different values.
14524 ac_arch=
14525 ac_prev=
14526 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14527 if test -n "$ac_prev"; then
14528 case $ac_word in
14529 i?86 | x86_64 | ppc | ppc64)
14530 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14531 ac_arch=$ac_word
14532 else
14533 ac_cv_c_bigendian=universal
14534 break
14535 fi
14536 ;;
14537 esac
14538 ac_prev=
14539 elif test "x$ac_word" = "x-arch"; then
14540 ac_prev=arch
14541 fi
14542 done
14543fi
14544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14545 if test $ac_cv_c_bigendian = unknown; then
14546 # See if sys/param.h defines the BYTE_ORDER macro.
14547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014548/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014549#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014551
Martin v. Löwis11437992002-04-12 09:54:03 +000014552int
14553main ()
14554{
Matthias Kloseb9621712010-04-24 17:59:49 +000014555#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14556 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14557 && LITTLE_ENDIAN)
14558 bogus endian macros
14559 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
14561 ;
14562 return 0;
14563}
14564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014565if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014566 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014568/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014569#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571
Martin v. Löwis11437992002-04-12 09:54:03 +000014572int
14573main ()
14574{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 not big endian
14577 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
14579 ;
14580 return 0;
14581}
14582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014583if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014584 ac_cv_c_bigendian=yes
14585else
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014589fi
14590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14591 fi
14592 if test $ac_cv_c_bigendian = unknown; then
14593 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014595/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014596#include <limits.h>
14597
Martin v. Löwis11437992002-04-12 09:54:03 +000014598int
14599main ()
14600{
Matthias Kloseb9621712010-04-24 17:59:49 +000014601#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14602 bogus endian macros
14603 #endif
14604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 ;
14606 return 0;
14607}
14608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014609if ac_fn_c_try_compile "$LINENO"; then :
14610 # It does; now see whether it defined to _BIG_ENDIAN or not.
14611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14612/* end confdefs.h. */
14613#include <limits.h>
14614
14615int
14616main ()
14617{
14618#ifndef _BIG_ENDIAN
14619 not big endian
14620 #endif
14621
14622 ;
14623 return 0;
14624}
14625_ACEOF
14626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014627 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014628else
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14632fi
14633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14634 fi
14635 if test $ac_cv_c_bigendian = unknown; then
14636 # Compile a test program.
14637 if test "$cross_compiling" = yes; then :
14638 # Try to guess by grepping values from an object file.
14639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14640/* end confdefs.h. */
14641short int ascii_mm[] =
14642 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14643 short int ascii_ii[] =
14644 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14645 int use_ascii (int i) {
14646 return ascii_mm[i] + ascii_ii[i];
14647 }
14648 short int ebcdic_ii[] =
14649 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14650 short int ebcdic_mm[] =
14651 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14652 int use_ebcdic (int i) {
14653 return ebcdic_mm[i] + ebcdic_ii[i];
14654 }
14655 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657int
14658main ()
14659{
14660return use_ascii (foo) == use_ebcdic (foo);
14661 ;
14662 return 0;
14663}
14664_ACEOF
14665if ac_fn_c_try_compile "$LINENO"; then :
14666 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14667 ac_cv_c_bigendian=yes
14668 fi
14669 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14670 if test "$ac_cv_c_bigendian" = unknown; then
14671 ac_cv_c_bigendian=no
14672 else
14673 # finding both strings is unlikely to happen, but who knows?
14674 ac_cv_c_bigendian=unknown
14675 fi
14676 fi
14677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014679else
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014681/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014683int
14684main ()
14685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 /* Are we little or big endian? From Harbison&Steele. */
14688 union
14689 {
14690 long int l;
14691 char c[sizeof (long int)];
14692 } u;
14693 u.l = 1;
14694 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695
14696 ;
14697 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014698}
Martin v. Löwis11437992002-04-12 09:54:03 +000014699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014700if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014701 ac_cv_c_bigendian=no
14702else
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14712$as_echo "$ac_cv_c_bigendian" >&6; }
14713 case $ac_cv_c_bigendian in #(
14714 yes)
14715 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14716;; #(
14717 no)
14718 ;; #(
14719 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014720
Matthias Kloseb9621712010-04-24 17:59:49 +000014721$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723 ;; #(
14724 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014725 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014726 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014727 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014728
Michael W. Hudson54241132001-12-07 15:38:26 +000014729
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014730# ABI version string for Python extension modules. This appears between the
14731# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14732# from the following attributes which affect the ABI of this Python build (in
14733# this order):
14734#
14735# * The Python implementation (always 'cpython-' for us)
14736# * The major and minor version numbers
14737# * --with-pydebug (adds a 'd')
14738# * --with-pymalloc (adds a 'm')
14739# * --with-wide-unicode (adds a 'u')
14740#
14741# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014742# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14743# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014744
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14746$as_echo_n "checking ABIFLAGS... " >&6; }
14747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14748$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14750$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014751SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14753$as_echo "$SOABI" >&6; }
14754
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014755
14756case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014757 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014758 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14759 *)
14760 EXT_SUFFIX=${SHLIB_SUFFIX};;
14761esac
14762
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14764$as_echo_n "checking LDVERSION... " >&6; }
14765LDVERSION='$(VERSION)$(ABIFLAGS)'
14766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14767$as_echo "$LDVERSION" >&6; }
14768
doko@python.org87421192013-01-26 11:39:31 +010014769
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014770LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014771
14772
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014773# Check whether right shifting a negative integer extends the sign bit
14774# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14776$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014777if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014779else
Martin v. Löwis11437992002-04-12 09:54:03 +000014780
Matthias Kloseb9621712010-04-24 17:59:49 +000014781if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014782 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014785/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014786
14787int main()
14788{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014789 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014790}
14791
Martin v. Löwis11437992002-04-12 09:54:03 +000014792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014793if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014794 ac_cv_rshift_extends_sign=yes
14795else
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014798rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14799 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014800fi
14801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802fi
14803
Matthias Kloseb9621712010-04-24 17:59:49 +000014804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14805$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014806if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014807then
Martin v. Löwis11437992002-04-12 09:54:03 +000014808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014810
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014811fi
14812
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014813# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14815$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014816if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014818else
Martin v. Löwis11437992002-04-12 09:54:03 +000014819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014821/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014822#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014823int
14824main ()
14825{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014826
14827 FILE *f = fopen("/dev/null", "r");
14828 flockfile(f);
14829 getc_unlocked(f);
14830 funlockfile(f);
14831
Martin v. Löwis11437992002-04-12 09:54:03 +000014832 ;
14833 return 0;
14834}
14835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014836if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014837 ac_cv_have_getc_unlocked=yes
14838else
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 ac_cv_have_getc_unlocked=no
14840fi
14841rm -f core conftest.err conftest.$ac_objext \
14842 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14846$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014847if test "$ac_cv_have_getc_unlocked" = yes
14848then
Martin v. Löwis11437992002-04-12 09:54:03 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014851
14852fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014853
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014854# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014855# save the value of LIBS so we don't actually link Python with readline
14856LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014857
Gregory P. Smith18820942008-09-07 06:24:49 +000014858# On some systems we need to link readline to a termcap compatible
14859# library. NOTE: Keep the precedence of listed libraries synchronised
14860# with setup.py.
14861py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14863$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014864for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014865 if test -z "$py_libtermcap"; then
14866 READLINE_LIBS="-lreadline"
14867 else
14868 READLINE_LIBS="-lreadline -l$py_libtermcap"
14869 fi
14870 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014872/* end confdefs.h. */
14873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874/* Override any GCC internal prototype to avoid an error.
14875 Use char because int might match the return type of a GCC
14876 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014877#ifdef __cplusplus
14878extern "C"
14879#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014880char readline ();
14881int
14882main ()
14883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014885 ;
14886 return 0;
14887}
14888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014889if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014890 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014892rm -f core conftest.err conftest.$ac_objext \
14893 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014894 if test $py_cv_lib_readline = yes; then
14895 break
14896 fi
14897done
14898# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14899#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014900if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14902$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014903else
Matthias Kloseb9621712010-04-24 17:59:49 +000014904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14905$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014908
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014909fi
14910
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014911# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14913$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014914if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014916else
14917 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014918LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014920/* end confdefs.h. */
14921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922/* Override any GCC internal prototype to avoid an error.
14923 Use char because int might match the return type of a GCC
14924 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014925#ifdef __cplusplus
14926extern "C"
14927#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014928char rl_callback_handler_install ();
14929int
14930main ()
14931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014933 ;
14934 return 0;
14935}
14936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014937if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014938 ac_cv_lib_readline_rl_callback_handler_install=yes
14939else
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014942rm -f core conftest.err conftest.$ac_objext \
14943 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014944LIBS=$ac_check_lib_save_LIBS
14945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14947$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014948if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014949
Matthias Kloseb9621712010-04-24 17:59:49 +000014950$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014951
14952fi
14953
14954
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014955# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014957/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014958#include <readline/readline.h>
14959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014960if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014961 have_readline=yes
14962else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014963 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014964
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014965fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014966rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014967if test $have_readline = yes
14968then
Matthias Kloseb9621712010-04-24 17:59:49 +000014969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971#include <readline/readline.h>
14972
14973_ACEOF
14974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014978
14979fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014980rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014983/* end confdefs.h. */
14984#include <readline/readline.h>
14985
14986_ACEOF
14987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014988 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014991
14992fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014993rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014994
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014995fi
14996
Martin v. Löwis0daad592001-09-30 21:09:59 +000014997# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14999$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015000if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015002else
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015004LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008/* Override any GCC internal prototype to avoid an error.
15009 Use char because int might match the return type of a GCC
15010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015011#ifdef __cplusplus
15012extern "C"
15013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015014char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015015int
15016main ()
15017{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 ;
15020 return 0;
15021}
15022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015023if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015028rm -f core conftest.err conftest.$ac_objext \
15029 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015030LIBS=$ac_check_lib_save_LIBS
15031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15033$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015034if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015037
Martin v. Löwis0daad592001-09-30 21:09:59 +000015038fi
15039
Michael W. Hudson54241132001-12-07 15:38:26 +000015040
Thomas Wouters89d996e2007-09-08 17:39:28 +000015041# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15043$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015044if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015046else
15047 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015048LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015050/* end confdefs.h. */
15051
15052/* Override any GCC internal prototype to avoid an error.
15053 Use char because int might match the return type of a GCC
15054 builtin and then its argument prototype would still apply. */
15055#ifdef __cplusplus
15056extern "C"
15057#endif
15058char rl_completion_display_matches_hook ();
15059int
15060main ()
15061{
15062return rl_completion_display_matches_hook ();
15063 ;
15064 return 0;
15065}
15066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015067if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015068 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15069else
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015072rm -f core conftest.err conftest.$ac_objext \
15073 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015074LIBS=$ac_check_lib_save_LIBS
15075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15077$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015078if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015081
15082fi
15083
15084
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015085# also in 4.0, but not in editline
15086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15087$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15088if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15089 $as_echo_n "(cached) " >&6
15090else
15091 ac_check_lib_save_LIBS=$LIBS
15092LIBS="-lreadline $READLINE_LIBS $LIBS"
15093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15094/* end confdefs.h. */
15095
15096/* Override any GCC internal prototype to avoid an error.
15097 Use char because int might match the return type of a GCC
15098 builtin and then its argument prototype would still apply. */
15099#ifdef __cplusplus
15100extern "C"
15101#endif
15102char rl_resize_terminal ();
15103int
15104main ()
15105{
15106return rl_resize_terminal ();
15107 ;
15108 return 0;
15109}
15110_ACEOF
15111if ac_fn_c_try_link "$LINENO"; then :
15112 ac_cv_lib_readline_rl_resize_terminal=yes
15113else
15114 ac_cv_lib_readline_rl_resize_terminal=no
15115fi
15116rm -f core conftest.err conftest.$ac_objext \
15117 conftest$ac_exeext conftest.$ac_ext
15118LIBS=$ac_check_lib_save_LIBS
15119fi
15120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15121$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15122if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15123
15124$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15125
15126fi
15127
15128
Martin v. Löwis0daad592001-09-30 21:09:59 +000015129# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15131$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015132if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015134else
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015136LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015140/* Override any GCC internal prototype to avoid an error.
15141 Use char because int might match the return type of a GCC
15142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015143#ifdef __cplusplus
15144extern "C"
15145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015146char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015147int
15148main ()
15149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 ;
15152 return 0;
15153}
15154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015155if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015157else
Matthias Kloseb9621712010-04-24 17:59:49 +000015158 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015160rm -f core conftest.err conftest.$ac_objext \
15161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015162LIBS=$ac_check_lib_save_LIBS
15163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15165$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015166if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015167
Matthias Kloseb9621712010-04-24 17:59:49 +000015168$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015169
Guido van Rossum353ae582001-07-10 16:45:32 +000015170fi
15171
Jack Jansendd19cf82001-12-06 22:36:17 +000015172
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015173# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015175/* end confdefs.h. */
15176#include <readline/readline.h>
15177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015178if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015179 have_readline=yes
15180else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015182
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015183fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015184rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015185if test $have_readline = yes
15186then
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015188/* end confdefs.h. */
15189#include <readline/readline.h>
15190
15191_ACEOF
15192if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015196
15197fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015198rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015199
15200fi
15201
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15203$as_echo_n "checking for append_history in -lreadline... " >&6; }
15204if ${ac_cv_lib_readline_append_history+:} false; then :
15205 $as_echo_n "(cached) " >&6
15206else
15207 ac_check_lib_save_LIBS=$LIBS
15208LIBS="-lreadline $READLINE_LIBS $LIBS"
15209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15210/* end confdefs.h. */
15211
15212/* Override any GCC internal prototype to avoid an error.
15213 Use char because int might match the return type of a GCC
15214 builtin and then its argument prototype would still apply. */
15215#ifdef __cplusplus
15216extern "C"
15217#endif
15218char append_history ();
15219int
15220main ()
15221{
15222return append_history ();
15223 ;
15224 return 0;
15225}
15226_ACEOF
15227if ac_fn_c_try_link "$LINENO"; then :
15228 ac_cv_lib_readline_append_history=yes
15229else
15230 ac_cv_lib_readline_append_history=no
15231fi
15232rm -f core conftest.err conftest.$ac_objext \
15233 conftest$ac_exeext conftest.$ac_ext
15234LIBS=$ac_check_lib_save_LIBS
15235fi
15236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15237$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15238if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15239
15240$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15241
15242fi
15243
15244
Martin v. Löwis82bca632006-02-10 20:49:30 +000015245# End of readline checks: restore LIBS
15246LIBS=$LIBS_no_readline
15247
Matthias Kloseb9621712010-04-24 17:59:49 +000015248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15249$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015250if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015255 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015256else
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015258/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015259
15260int main()
15261{
15262 int val1 = nice(1);
15263 if (val1 != -1 && val1 == nice(2))
15264 exit(0);
15265 exit(1);
15266}
15267
Martin v. Löwis11437992002-04-12 09:54:03 +000015268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015269if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015270 ac_cv_broken_nice=yes
15271else
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15275 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015276fi
15277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278fi
15279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15281$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015282if test "$ac_cv_broken_nice" = yes
15283then
Martin v. Löwis11437992002-04-12 09:54:03 +000015284
Matthias Kloseb9621712010-04-24 17:59:49 +000015285$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015286
15287fi
15288
Matthias Kloseb9621712010-04-24 17:59:49 +000015289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15290$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015291if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015292 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015293else
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015295 ac_cv_broken_poll=no
15296else
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015298/* end confdefs.h. */
15299
15300#include <poll.h>
15301
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015302int main()
15303{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015304 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015305 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015306
15307 close (42);
15308
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015309 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015310 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015311 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015312 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015313 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015315 return 1;
15316}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015317
15318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015319if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015320 ac_cv_broken_poll=yes
15321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15325 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015328fi
15329
Matthias Kloseb9621712010-04-24 17:59:49 +000015330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15331$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015332if test "$ac_cv_broken_poll" = yes
15333then
15334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336
15337fi
15338
Brett Cannon43802422005-02-10 20:48:03 +000015339# 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 +000015340# (which is not required by ISO C or UNIX spec) and/or if we support
15341# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015342ac_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 +000015343#include <$ac_cv_struct_tm>
15344
Matthias Kloseb9621712010-04-24 17:59:49 +000015345"
Victor Stinnere0be4232011-10-25 13:06:09 +020015346if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015347
15348cat >>confdefs.h <<_ACEOF
15349#define HAVE_STRUCT_TM_TM_ZONE 1
15350_ACEOF
15351
15352
15353fi
15354
15355if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015358
15359else
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15361"
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366fi
15367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015369#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370_ACEOF
15371
Matthias Kloseb9621712010-04-24 17:59:49 +000015372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15373$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015374if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376else
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015378/* end confdefs.h. */
15379#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380#if !HAVE_DECL_TZNAME
15381extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015382#endif
15383
15384int
15385main ()
15386{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015387return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015388 ;
15389 return 0;
15390}
15391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015392if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015393 ac_cv_var_tzname=yes
15394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015397rm -f core conftest.err conftest.$ac_objext \
15398 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15401$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015402 if test $ac_cv_var_tzname = yes; then
15403
Matthias Kloseb9621712010-04-24 17:59:49 +000015404$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015405
15406 fi
15407fi
15408
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015409
Martin v. Löwis1d459062005-03-14 21:23:33 +000015410# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15412$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015413if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015415else
15416
Matthias Kloseb9621712010-04-24 17:59:49 +000015417if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015418 ac_cv_working_tzset=no
15419else
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015421/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015422
15423#include <stdlib.h>
15424#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015425#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015426
15427#if HAVE_TZNAME
15428extern char *tzname[];
15429#endif
15430
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015431int main()
15432{
Brett Cannon18367812003-09-19 00:59:16 +000015433 /* Note that we need to ensure that not only does tzset(3)
15434 do 'something' with localtime, but it works as documented
15435 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015436 This includes making sure that tzname is set properly if
15437 tm->tm_zone does not exist since it is the alternative way
15438 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015439
15440 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015441 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015442 */
15443
Martin v. Löwis1d459062005-03-14 21:23:33 +000015444 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015445 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15446
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015447 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015448 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015449 if (localtime(&groundhogday)->tm_hour != 0)
15450 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015451#if HAVE_TZNAME
15452 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15453 if (strcmp(tzname[0], "UTC") ||
15454 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15455 exit(1);
15456#endif
Brett Cannon18367812003-09-19 00:59:16 +000015457
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015458 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015459 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015460 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015461 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015462#if HAVE_TZNAME
15463 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15464 exit(1);
15465#endif
Brett Cannon18367812003-09-19 00:59:16 +000015466
15467 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15468 tzset();
15469 if (localtime(&groundhogday)->tm_hour != 11)
15470 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015471#if HAVE_TZNAME
15472 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15473 exit(1);
15474#endif
15475
15476#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015477 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15478 exit(1);
15479 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15480 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015481#endif
Brett Cannon18367812003-09-19 00:59:16 +000015482
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015483 exit(0);
15484}
15485
15486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015487if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015488 ac_cv_working_tzset=yes
15489else
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15493 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015494fi
15495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496fi
15497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15499$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015500if test "$ac_cv_working_tzset" = yes
15501then
15502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015504
15505fi
15506
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015507# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15509$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015510if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015511 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015512else
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015515#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015516int
15517main ()
15518{
15519
15520struct stat st;
15521st.st_mtim.tv_nsec = 1;
15522
15523 ;
15524 return 0;
15525}
15526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015528 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015529else
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15533fi
15534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15536$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015537if test "$ac_cv_stat_tv_nsec" = yes
15538then
15539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015541
15542fi
15543
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015544# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15546$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015547if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015549else
Matthias Kloseb9621712010-04-24 17:59:49 +000015550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015551/* end confdefs.h. */
15552#include <sys/stat.h>
15553int
15554main ()
15555{
15556
15557struct stat st;
15558st.st_mtimespec.tv_nsec = 1;
15559
15560 ;
15561 return 0;
15562}
15563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015565 ac_cv_stat_tv_nsec2=yes
15566else
Matthias Kloseb9621712010-04-24 17:59:49 +000015567 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15570fi
15571
Matthias Kloseb9621712010-04-24 17:59:49 +000015572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15573$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015574if test "$ac_cv_stat_tv_nsec2" = yes
15575then
15576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015578
15579fi
15580
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015581# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015582ac_save_cppflags="$CPPFLAGS"
15583CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015584
15585for ac_header in curses.h ncurses.h
15586do :
15587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15588ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15589if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15590 cat >>confdefs.h <<_ACEOF
15591#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15592_ACEOF
15593
15594fi
15595
15596done
15597
15598
15599# On Solaris, term.h requires curses.h
15600for ac_header in term.h
15601do :
15602 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15603#ifdef HAVE_CURSES_H
15604#include <curses.h>
15605#endif
15606
15607"
15608if test "x$ac_cv_header_term_h" = xyes; then :
15609 cat >>confdefs.h <<_ACEOF
15610#define HAVE_TERM_H 1
15611_ACEOF
15612
15613fi
15614
15615done
15616
15617
Jack Jansen666b1e72001-10-31 12:11:48 +000015618# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15620$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015621if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015623else
Matthias Kloseb9621712010-04-24 17:59:49 +000015624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015625/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015626#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015627int
15628main ()
15629{
Jack Jansen666b1e72001-10-31 12:11:48 +000015630
15631 int rtn;
15632 rtn = mvwdelch(0,0,0);
15633
Martin v. Löwis11437992002-04-12 09:54:03 +000015634 ;
15635 return 0;
15636}
15637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015638if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015639 ac_cv_mvwdelch_is_expression=yes
15640else
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15644fi
15645
Matthias Kloseb9621712010-04-24 17:59:49 +000015646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15647$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015648
15649if test "$ac_cv_mvwdelch_is_expression" = yes
15650then
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
Matthias Kloseb9621712010-04-24 17:59:49 +000015652$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015653
15654fi
15655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15657$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015658if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015660else
Matthias Kloseb9621712010-04-24 17:59:49 +000015661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015662/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015663#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015664int
15665main ()
15666{
Jack Jansen666b1e72001-10-31 12:11:48 +000015667
15668 WINDOW *w;
15669 w->_flags = 0;
15670
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 ;
15672 return 0;
15673}
15674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015675if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015676 ac_cv_window_has_flags=yes
15677else
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15681fi
15682
Matthias Kloseb9621712010-04-24 17:59:49 +000015683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15684$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015685
Jack Jansen666b1e72001-10-31 12:11:48 +000015686
15687if test "$ac_cv_window_has_flags" = yes
15688then
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
Matthias Kloseb9621712010-04-24 17:59:49 +000015690$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015691
15692fi
15693
Matthias Kloseb9621712010-04-24 17:59:49 +000015694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15695$as_echo_n "checking for is_term_resized... " >&6; }
15696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015697/* end confdefs.h. */
15698#include <curses.h>
15699int
15700main ()
15701{
15702void *x=is_term_resized
15703 ;
15704 return 0;
15705}
15706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015708
Matthias Kloseb9621712010-04-24 17:59:49 +000015709$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015710
Matthias Kloseb159a552010-04-25 21:00:44 +000015711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015712$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015713else
Matthias Kloseb9621712010-04-24 17:59:49 +000015714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15715$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015716
15717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15721$as_echo_n "checking for resize_term... " >&6; }
15722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015723/* end confdefs.h. */
15724#include <curses.h>
15725int
15726main ()
15727{
15728void *x=resize_term
15729 ;
15730 return 0;
15731}
15732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015733if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015736
Matthias Kloseb159a552010-04-25 21:00:44 +000015737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015738$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015739else
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15741$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015742
15743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15747$as_echo_n "checking for resizeterm... " >&6; }
15748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015749/* end confdefs.h. */
15750#include <curses.h>
15751int
15752main ()
15753{
15754void *x=resizeterm
15755 ;
15756 return 0;
15757}
15758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015759if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015762
Matthias Kloseb159a552010-04-25 21:00:44 +000015763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015764$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015765else
Matthias Kloseb9621712010-04-24 17:59:49 +000015766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15767$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015768
15769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015771# last curses configure check
15772CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15775$as_echo "$as_me: checking for device files" >&6;}
15776
15777if test "x$cross_compiling" = xyes; then
15778 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15780$as_echo_n "checking for /dev/ptmx... " >&6; }
15781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15782$as_echo "not set" >&6; }
15783 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15784 fi
15785 if test "${ac_cv_file__dev_ptc+set}" != set; then
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15787$as_echo_n "checking for /dev/ptc... " >&6; }
15788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15789$as_echo "not set" >&6; }
15790 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15791 fi
15792fi
15793
Matthias Kloseb9621712010-04-24 17:59:49 +000015794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15795$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015796if ${ac_cv_file__dev_ptmx+:} false; then :
15797 $as_echo_n "(cached) " >&6
15798else
15799 test "$cross_compiling" = yes &&
15800 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15801if test -r "/dev/ptmx"; then
15802 ac_cv_file__dev_ptmx=yes
15803else
15804 ac_cv_file__dev_ptmx=no
15805fi
15806fi
15807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15808$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15809if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015810
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015811fi
15812
15813if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015816
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15819$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015820if ${ac_cv_file__dev_ptc+:} false; then :
15821 $as_echo_n "(cached) " >&6
15822else
15823 test "$cross_compiling" = yes &&
15824 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15825if test -r "/dev/ptc"; then
15826 ac_cv_file__dev_ptc=yes
15827else
15828 ac_cv_file__dev_ptc=no
15829fi
15830fi
15831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15832$as_echo "$ac_cv_file__dev_ptc" >&6; }
15833if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015834
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015835fi
15836
15837if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015840
Neal Norwitz865400f2003-03-21 01:42:58 +000015841fi
15842
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015843if test "$have_long_long" = yes
15844then
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15846$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015847 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015849else
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015851 ac_cv_have_long_long_format="cross -- assuming no"
15852 if test x$GCC = xyes; then
15853 save_CFLAGS=$CFLAGS
15854 CFLAGS="$CFLAGS -Werror -Wformat"
15855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15856/* end confdefs.h. */
15857
15858 #include <stdio.h>
15859 #include <stddef.h>
15860
15861int
15862main ()
15863{
15864
15865 char *buffer;
15866 sprintf(buffer, "%lld", (long long)123);
15867 sprintf(buffer, "%lld", (long long)-123);
15868 sprintf(buffer, "%llu", (unsigned long long)123);
15869
15870 ;
15871 return 0;
15872}
15873_ACEOF
15874if ac_fn_c_try_compile "$LINENO"; then :
15875 ac_cv_have_long_long_format=yes
15876
15877fi
15878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15879 CFLAGS=$save_CFLAGS
15880 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015881else
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015883/* end confdefs.h. */
15884
15885 #include <stdio.h>
15886 #include <stddef.h>
15887 #include <string.h>
15888
15889 #ifdef HAVE_SYS_TYPES_H
15890 #include <sys/types.h>
15891 #endif
15892
15893 int main()
15894 {
15895 char buffer[256];
15896
15897 if (sprintf(buffer, "%lld", (long long)123) < 0)
15898 return 1;
15899 if (strcmp(buffer, "123"))
15900 return 1;
15901
15902 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15903 return 1;
15904 if (strcmp(buffer, "-123"))
15905 return 1;
15906
15907 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15908 return 1;
15909 if (strcmp(buffer, "123"))
15910 return 1;
15911
15912 return 0;
15913 }
15914
15915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015916if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015917 ac_cv_have_long_long_format=yes
15918else
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015923fi
15924
15925
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015926fi
15927
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15929$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015930fi
15931
Mark Dickinson89d7d412009-12-31 20:50:59 +000015932if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015933then
15934
Matthias Kloseb9621712010-04-24 17:59:49 +000015935$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015936
15937fi
15938
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015939if test $ac_sys_system = Darwin
15940then
15941 LIBS="$LIBS -framework CoreFoundation"
15942fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015943
Matthias Kloseb9621712010-04-24 17:59:49 +000015944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15945$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015946if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015947 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015948else
Matthias Kloseb9621712010-04-24 17:59:49 +000015949 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015950 ac_cv_have_size_t_format="cross -- assuming yes"
15951
Thomas Wouters477c8d52006-05-27 19:21:47 +000015952else
Matthias Kloseb9621712010-04-24 17:59:49 +000015953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015954/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015955
Thomas Wouters477c8d52006-05-27 19:21:47 +000015956#include <stdio.h>
15957#include <stddef.h>
15958#include <string.h>
15959
Christian Heimes2c181612007-12-17 20:04:13 +000015960#ifdef HAVE_SYS_TYPES_H
15961#include <sys/types.h>
15962#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015963
15964#ifdef HAVE_SSIZE_T
15965typedef ssize_t Py_ssize_t;
15966#elif SIZEOF_VOID_P == SIZEOF_LONG
15967typedef long Py_ssize_t;
15968#else
15969typedef int Py_ssize_t;
15970#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015971
Christian Heimes2c181612007-12-17 20:04:13 +000015972int main()
15973{
15974 char buffer[256];
15975
Thomas Wouters477c8d52006-05-27 19:21:47 +000015976 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15977 return 1;
15978
Thomas Wouters89f507f2006-12-13 04:49:30 +000015979 if (strcmp(buffer, "123"))
15980 return 1;
15981
15982 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15983 return 1;
15984
15985 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015986 return 1;
15987
15988 return 0;
15989}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015990
Thomas Wouters477c8d52006-05-27 19:21:47 +000015991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015992if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015993 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015994else
Matthias Kloseb9621712010-04-24 17:59:49 +000015995 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015999fi
16000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16003$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016004if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016005
Matthias Kloseb9621712010-04-24 17:59:49 +000016006$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016007
16008fi
16009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016011#ifdef HAVE_SYS_TYPES_H
16012#include <sys/types.h>
16013#endif
16014#ifdef HAVE_SYS_SOCKET_H
16015#include <sys/socket.h>
16016#endif
16017
Matthias Kloseb9621712010-04-24 17:59:49 +000016018"
Victor Stinnere0be4232011-10-25 13:06:09 +020016019if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016022
Matthias Kloseb9621712010-04-24 17:59:49 +000016023$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016024
16025fi
16026
Michael W. Hudson54241132001-12-07 15:38:26 +000016027
Matthias Kloseb9621712010-04-24 17:59:49 +000016028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16029$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016030if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016031 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016032else
Matthias Kloseb9621712010-04-24 17:59:49 +000016033 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016034 ac_cv_broken_mbstowcs=no
16035else
Matthias Kloseb9621712010-04-24 17:59:49 +000016036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016037/* end confdefs.h. */
16038
Stefan Krah19c21392012-11-22 23:47:32 +010016039#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016040#include<stdlib.h>
16041int main() {
16042 size_t len = -1;
16043 const char *str = "text";
16044 len = mbstowcs(NULL, str, 0);
16045 return (len != 4);
16046}
16047
16048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016049if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016050 ac_cv_broken_mbstowcs=no
16051else
Matthias Kloseb9621712010-04-24 17:59:49 +000016052 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016056fi
16057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016058fi
16059
Matthias Kloseb9621712010-04-24 17:59:49 +000016060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16061$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016062if test "$ac_cv_broken_mbstowcs" = yes
16063then
16064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016066
16067fi
16068
Antoine Pitroub52ec782009-01-25 16:34:23 +000016069# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16071$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016072
16073# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016074if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016075 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016076if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016077then
16078
Matthias Kloseb9621712010-04-24 17:59:49 +000016079$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016080
Matthias Kloseb9621712010-04-24 17:59:49 +000016081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16082$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016083fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016084if test "$withval" = no
16085then
16086
16087$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16088
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16090$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016091fi
16092
Antoine Pitrou042b1282010-08-13 21:15:58 +000016093else
16094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16095$as_echo "no value specified" >&6; }
16096fi
16097
Antoine Pitroub52ec782009-01-25 16:34:23 +000016098
Matthias Kloseb17289e2012-03-15 19:51:34 +010016099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16100$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16101if ${ac_cv_computed_gotos+:} false; then :
16102 $as_echo_n "(cached) " >&6
16103else
16104 if test "$cross_compiling" = yes; then :
16105 if test "${with_computed_gotos+set}" = set; then
16106 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16107 else
16108 ac_cv_computed_gotos=no
16109 fi
16110else
16111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16112/* end confdefs.h. */
16113
16114int main(int argc, char **argv)
16115{
16116 static void *targets[1] = { &&LABEL1 };
16117 goto LABEL2;
16118LABEL1:
16119 return 0;
16120LABEL2:
16121 goto *targets[0];
16122 return 1;
16123}
16124
16125_ACEOF
16126if ac_fn_c_try_run "$LINENO"; then :
16127 ac_cv_computed_gotos=yes
16128else
16129 ac_cv_computed_gotos=no
16130fi
16131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16132 conftest.$ac_objext conftest.beam conftest.$ac_ext
16133fi
16134
16135fi
16136
16137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16138$as_echo "$ac_cv_computed_gotos" >&6; }
16139case "$ac_cv_computed_gotos" in yes*)
16140
16141$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16142
16143esac
16144
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016145case $ac_sys_system in
16146AIX*)
16147
16148$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16149 ;;
16150esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016151
Michael W. Hudson54241132001-12-07 15:38:26 +000016152
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016153
16154
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016155for h in `(cd $srcdir;echo Python/thread_*.h)`
16156do
16157 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16158done
16159
Michael W. Hudson54241132001-12-07 15:38:26 +000016160
Ned Deily0db50cf2014-07-25 12:41:31 -070016161SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16163$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016164for dir in $SRCDIRS; do
16165 if test ! -d $dir; then
16166 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016167 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016168done
Matthias Kloseb9621712010-04-24 17:59:49 +000016169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16170$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016171
Stefan Krah1919b7e2012-03-21 18:25:23 +010016172# Availability of -O2:
16173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16174$as_echo_n "checking for -O2... " >&6; }
16175saved_cflags="$CFLAGS"
16176CFLAGS="-O2"
16177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178/* end confdefs.h. */
16179
16180int
16181main ()
16182{
16183
16184
16185 ;
16186 return 0;
16187}
16188_ACEOF
16189if ac_fn_c_try_compile "$LINENO"; then :
16190 have_O2=yes
16191else
16192 have_O2=no
16193fi
16194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16196$as_echo "$have_O2" >&6; }
16197CFLAGS="$saved_cflags"
16198
16199# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16200# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16202$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16203saved_cflags="$CFLAGS"
16204CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16205if test "$have_O2" = no; then
16206 CFLAGS=""
16207fi
16208if test "$cross_compiling" = yes; then :
16209 have_glibc_memmove_bug=undefined
16210else
16211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16212/* end confdefs.h. */
16213
16214#include <stdio.h>
16215#include <stdlib.h>
16216#include <string.h>
16217void foo(void *p, void *q) { memmove(p, q, 19); }
16218int main() {
16219 char a[32] = "123456789000000000";
16220 foo(&a[9], a);
16221 if (strcmp(a, "123456789123456789000000000") != 0)
16222 return 1;
16223 foo(a, &a[9]);
16224 if (strcmp(a, "123456789000000000") != 0)
16225 return 1;
16226 return 0;
16227}
16228
16229_ACEOF
16230if ac_fn_c_try_run "$LINENO"; then :
16231 have_glibc_memmove_bug=no
16232else
16233 have_glibc_memmove_bug=yes
16234fi
16235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16236 conftest.$ac_objext conftest.beam conftest.$ac_ext
16237fi
16238
16239CFLAGS="$saved_cflags"
16240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16241$as_echo "$have_glibc_memmove_bug" >&6; }
16242if test "$have_glibc_memmove_bug" = yes; then
16243
16244$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16245
16246fi
16247
16248if test "$have_gcc_asm_for_x87" = yes; then
16249 # Some versions of gcc miscompile inline asm:
16250 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16251 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16252 case $CC in
16253 *gcc*)
16254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16255$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16256 saved_cflags="$CFLAGS"
16257 CFLAGS="-O2"
16258 if test "$cross_compiling" = yes; then :
16259 have_ipa_pure_const_bug=undefined
16260else
16261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16262/* end confdefs.h. */
16263
16264 __attribute__((noinline)) int
16265 foo(int *p) {
16266 int r;
16267 asm ( "movl \$6, (%1)\n\t"
16268 "xorl %0, %0\n\t"
16269 : "=r" (r) : "r" (p) : "memory"
16270 );
16271 return r;
16272 }
16273 int main() {
16274 int p = 8;
16275 if ((foo(&p) ? : p) != 6)
16276 return 1;
16277 return 0;
16278 }
16279
16280_ACEOF
16281if ac_fn_c_try_run "$LINENO"; then :
16282 have_ipa_pure_const_bug=no
16283else
16284 have_ipa_pure_const_bug=yes
16285fi
16286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16287 conftest.$ac_objext conftest.beam conftest.$ac_ext
16288fi
16289
16290 CFLAGS="$saved_cflags"
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16292$as_echo "$have_ipa_pure_const_bug" >&6; }
16293 if test "$have_ipa_pure_const_bug" = yes; then
16294
16295$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16296
16297 fi
16298 ;;
16299 esac
16300fi
16301
Victor Stinner4f5366e2015-01-09 02:13:19 +010016302# Check for stdatomic.h
16303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16304$as_echo_n "checking for stdatomic.h... " >&6; }
16305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16306/* end confdefs.h. */
16307
16308
16309 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016310 atomic_int value = ATOMIC_VAR_INIT(1);
16311 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016312 int main() {
16313 int loaded_value = atomic_load(&value);
16314 return 0;
16315 }
16316
16317
16318_ACEOF
16319if ac_fn_c_try_link "$LINENO"; then :
16320 have_stdatomic_h=yes
16321else
16322 have_stdatomic_h=no
16323fi
16324rm -f core conftest.err conftest.$ac_objext \
16325 conftest$ac_exeext conftest.$ac_ext
16326
16327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16328$as_echo "$have_stdatomic_h" >&6; }
16329
16330if test "$have_stdatomic_h" = yes; then
16331
16332$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16333
16334fi
16335
16336# Check for GCC >= 4.7 __atomic builtins
16337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16338$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16340/* end confdefs.h. */
16341
16342
16343 volatile int val = 1;
16344 int main() {
16345 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16346 return 0;
16347 }
16348
16349
16350_ACEOF
16351if ac_fn_c_try_link "$LINENO"; then :
16352 have_builtin_atomic=yes
16353else
16354 have_builtin_atomic=no
16355fi
16356rm -f core conftest.err conftest.$ac_objext \
16357 conftest$ac_exeext conftest.$ac_ext
16358
16359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16360$as_echo "$have_builtin_atomic" >&6; }
16361
16362if test "$have_builtin_atomic" = yes; then
16363
16364$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16365
16366fi
16367
Ned Deily322f5ba2013-11-21 23:01:59 -080016368# ensurepip option
16369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16370$as_echo_n "checking for ensurepip... " >&6; }
16371
16372# Check whether --with-ensurepip was given.
16373if test "${with_ensurepip+set}" = set; then :
16374 withval=$with_ensurepip;
16375else
16376 with_ensurepip=upgrade
16377fi
16378
16379case $with_ensurepip in #(
16380 yes|upgrade) :
16381 ENSUREPIP=upgrade ;; #(
16382 install) :
16383 ENSUREPIP=install ;; #(
16384 no) :
16385 ENSUREPIP=no ;; #(
16386 *) :
16387 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16388esac
16389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16390$as_echo "$ENSUREPIP" >&6; }
16391
16392
Victor Stinner35a97c02015-03-08 02:59:09 +010016393# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16395$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16397/* end confdefs.h. */
16398
16399
16400 #include <dirent.h>
16401
16402 int main() {
16403 struct dirent entry;
16404 return entry.d_type == DT_UNKNOWN;
16405 }
16406
16407
16408_ACEOF
16409if ac_fn_c_try_link "$LINENO"; then :
16410 have_dirent_d_type=yes
16411else
16412 have_dirent_d_type=no
16413fi
16414rm -f core conftest.err conftest.$ac_objext \
16415 conftest$ac_exeext conftest.$ac_ext
16416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16417$as_echo "$have_dirent_d_type" >&6; }
16418
16419if test "$have_dirent_d_type" = yes; then
16420
16421$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16422
16423fi
16424
Victor Stinner9eb57c52015-03-19 22:21:49 +010016425# check if the Linux getrandom() syscall is available
16426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16427$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16429/* end confdefs.h. */
16430
16431
Victor Stinner1b80b242016-04-12 22:34:58 +020016432 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016433 #include <sys/syscall.h>
16434
16435 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016436 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016437 const size_t buflen = sizeof(buffer);
16438 const int flags = 0;
Victor Stinner9eb57c52015-03-19 22:21:49 +010016439 /* ignore the result, Python checks for ENOSYS at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016440 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016441 return 0;
16442 }
16443
16444
16445_ACEOF
16446if ac_fn_c_try_link "$LINENO"; then :
16447 have_getrandom_syscall=yes
16448else
16449 have_getrandom_syscall=no
16450fi
16451rm -f core conftest.err conftest.$ac_objext \
16452 conftest$ac_exeext conftest.$ac_ext
16453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16454$as_echo "$have_getrandom_syscall" >&6; }
16455
16456if test "$have_getrandom_syscall" = yes; then
16457
16458$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16459
16460fi
16461
Victor Stinner3abf44e2015-09-18 15:38:37 +020016462# check if the getrandom() function is available
16463# the test was written for the Solaris function of <sys/random.h>
16464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16465$as_echo_n "checking for the getrandom() function... " >&6; }
16466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16467/* end confdefs.h. */
16468
16469
16470 #include <sys/random.h>
16471
16472 int main() {
16473 char buffer[1];
16474 const size_t buflen = sizeof(buffer);
16475 const int flags = 0;
16476 /* ignore the result, Python checks for ENOSYS at runtime */
16477 (void)getrandom(buffer, buflen, flags);
16478 return 0;
16479 }
16480
16481
16482_ACEOF
16483if ac_fn_c_try_link "$LINENO"; then :
16484 have_getrandom=yes
16485else
16486 have_getrandom=no
16487fi
16488rm -f core conftest.err conftest.$ac_objext \
16489 conftest$ac_exeext conftest.$ac_ext
16490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16491$as_echo "$have_getrandom" >&6; }
16492
16493if test "$have_getrandom" = yes; then
16494
16495$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16496
16497fi
16498
Guido van Rossum627b2d71993-12-24 10:39:16 +000016499# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016500ac_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 +000016501
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016502ac_config_files="$ac_config_files Modules/ld_so_aix"
16503
Martin v. Löwis11437992002-04-12 09:54:03 +000016504cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016505# This file is a shell script that caches the results of configure
16506# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016507# scripts and configure runs, see configure's option --config-cache.
16508# It is not useful on other systems. If it contains results you don't
16509# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016510#
Martin v. Löwis11437992002-04-12 09:54:03 +000016511# config.status only pays attention to the cache file if you give it
16512# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016513#
Skip Montanaro6dead952003-09-25 14:50:04 +000016514# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016515# loading this file, other *unset* `ac_cv_foo' will be assigned the
16516# following values.
16517
16518_ACEOF
16519
Guido van Rossumf78abae1997-01-21 22:02:36 +000016520# The following way of writing the cache mishandles newlines in values,
16521# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016523# Ultrix sh set writes to stderr and can't be redirected directly,
16524# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525(
16526 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16527 eval ac_val=\$$ac_var
16528 case $ac_val in #(
16529 *${as_nl}*)
16530 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016531 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16532$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 esac
16534 case $ac_var in #(
16535 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016536 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16537 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538 esac ;;
16539 esac
16540 done
16541
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16544 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 # `set' does not quote correctly, so add quotes: double-quote
16546 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016548 "s/'/'\\\\''/g;
16549 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 *)
16552 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555 esac |
16556 sort
16557) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016559 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16563 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16565 :end' >>confcache
16566if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16567 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016568 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016569 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16570$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016571 if test ! -f "$cache_file" || test -h "$cache_file"; then
16572 cat confcache >"$cache_file"
16573 else
16574 case $cache_file in #(
16575 */* | ?:*)
16576 mv -f confcache "$cache_file"$$ &&
16577 mv -f "$cache_file"$$ "$cache_file" ;; #(
16578 *)
16579 mv -f confcache "$cache_file" ;;
16580 esac
16581 fi
16582 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016583 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016584 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16585$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016586 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016587fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016588rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016590test "x$prefix" = xNONE && prefix=$ac_default_prefix
16591# Let make expand exec_prefix.
16592test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016593
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016594DEFS=-DHAVE_CONFIG_H
16595
Skip Montanaro6dead952003-09-25 14:50:04 +000016596ac_libobjs=
16597ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016598U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016599for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16600 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016602 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16604 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016605 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16606 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016607done
16608LIBOBJS=$ac_libobjs
16609
16610LTLIBOBJS=$ac_ltlibobjs
16611
16612
Martin v. Löwis11437992002-04-12 09:54:03 +000016613
Matthias Kloseb9621712010-04-24 17:59:49 +000016614
Victor Stinnere0be4232011-10-25 13:06:09 +020016615: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016616ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016617ac_clean_files_save=$ac_clean_files
16618ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016619{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16620$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16621as_write_fail=0
16622cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016623#! $SHELL
16624# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016625# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016626# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016627# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016628
Martin v. Löwis11437992002-04-12 09:54:03 +000016629debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016630ac_cs_recheck=false
16631ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016632
Matthias Kloseb9621712010-04-24 17:59:49 +000016633SHELL=\${CONFIG_SHELL-$SHELL}
16634export SHELL
16635_ASEOF
16636cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16637## -------------------- ##
16638## M4sh Initialization. ##
16639## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016641# Be more Bourne compatible
16642DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016643if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 emulate sh
16645 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016646 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016647 # is contrary to our usage. Disable this feature.
16648 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016650else
Matthias Kloseb9621712010-04-24 17:59:49 +000016651 case `(set -o) 2>/dev/null` in #(
16652 *posix*) :
16653 set -o posix ;; #(
16654 *) :
16655 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016657fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016658
16659
Matthias Kloseb9621712010-04-24 17:59:49 +000016660as_nl='
16661'
16662export as_nl
16663# Printing a long string crashes Solaris 7 /usr/bin/printf.
16664as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16665as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16666as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16667# Prefer a ksh shell builtin over an external printf program on Solaris,
16668# but without wasting forks for bash or zsh.
16669if test -z "$BASH_VERSION$ZSH_VERSION" \
16670 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16671 as_echo='print -r --'
16672 as_echo_n='print -rn --'
16673elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16674 as_echo='printf %s\n'
16675 as_echo_n='printf %s'
16676else
16677 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16678 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16679 as_echo_n='/usr/ucb/echo -n'
16680 else
16681 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16682 as_echo_n_body='eval
16683 arg=$1;
16684 case $arg in #(
16685 *"$as_nl"*)
16686 expr "X$arg" : "X\\(.*\\)$as_nl";
16687 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16688 esac;
16689 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16690 '
16691 export as_echo_n_body
16692 as_echo_n='sh -c $as_echo_n_body as_echo'
16693 fi
16694 export as_echo_body
16695 as_echo='sh -c $as_echo_body as_echo'
16696fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016697
16698# The user is always right.
16699if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016700 PATH_SEPARATOR=:
16701 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16702 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16703 PATH_SEPARATOR=';'
16704 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707
16708# IFS
16709# We need space, tab and new line, in precisely that order. Quoting is
16710# there to prevent editors from complaining about space-tab.
16711# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16712# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713IFS=" "" $as_nl"
16714
16715# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016716as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016717case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718 *[\\/]* ) as_myself=$0 ;;
16719 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016720for as_dir in $PATH
16721do
16722 IFS=$as_save_IFS
16723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016724 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 ;;
16729esac
16730# We did not find ourselves, most probably we were run as `sh COMMAND'
16731# in which case we are not to be found in the path.
16732if test "x$as_myself" = x; then
16733 as_myself=$0
16734fi
16735if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016736 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16737 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738fi
16739
Matthias Kloseb9621712010-04-24 17:59:49 +000016740# Unset variables that we do not need and which cause bugs (e.g. in
16741# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16742# suppresses any "Segmentation fault" message there. '((' could
16743# trigger a bug in pdksh 5.2.14.
16744for as_var in BASH_ENV ENV MAIL MAILPATH
16745do eval test x\${$as_var+set} = xset \
16746 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747done
16748PS1='$ '
16749PS2='> '
16750PS4='+ '
16751
16752# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016753LC_ALL=C
16754export LC_ALL
16755LANGUAGE=C
16756export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757
Matthias Kloseb9621712010-04-24 17:59:49 +000016758# CDPATH.
16759(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16760
16761
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016762# as_fn_error STATUS ERROR [LINENO LOG_FD]
16763# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016764# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16765# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016766# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016767as_fn_error ()
16768{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016769 as_status=$1; test $as_status -eq 0 && as_status=1
16770 if test "$4"; then
16771 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16772 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016773 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016774 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016775 as_fn_exit $as_status
16776} # as_fn_error
16777
16778
16779# as_fn_set_status STATUS
16780# -----------------------
16781# Set $? to STATUS, without forking.
16782as_fn_set_status ()
16783{
16784 return $1
16785} # as_fn_set_status
16786
16787# as_fn_exit STATUS
16788# -----------------
16789# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16790as_fn_exit ()
16791{
16792 set +e
16793 as_fn_set_status $1
16794 exit $1
16795} # as_fn_exit
16796
16797# as_fn_unset VAR
16798# ---------------
16799# Portably unset VAR.
16800as_fn_unset ()
16801{
16802 { eval $1=; unset $1;}
16803}
16804as_unset=as_fn_unset
16805# as_fn_append VAR VALUE
16806# ----------------------
16807# Append the text in VALUE to the end of the definition contained in VAR. Take
16808# advantage of any shell optimizations that allow amortized linear growth over
16809# repeated appends, instead of the typical quadratic growth present in naive
16810# implementations.
16811if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16812 eval 'as_fn_append ()
16813 {
16814 eval $1+=\$2
16815 }'
16816else
16817 as_fn_append ()
16818 {
16819 eval $1=\$$1\$2
16820 }
16821fi # as_fn_append
16822
16823# as_fn_arith ARG...
16824# ------------------
16825# Perform arithmetic evaluation on the ARGs, and store the result in the
16826# global $as_val. Take advantage of shells that can avoid forks. The arguments
16827# must be portable across $(()) and expr.
16828if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16829 eval 'as_fn_arith ()
16830 {
16831 as_val=$(( $* ))
16832 }'
16833else
16834 as_fn_arith ()
16835 {
16836 as_val=`expr "$@" || test $? -eq 1`
16837 }
16838fi # as_fn_arith
16839
16840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016841if expr a : '\(a\)' >/dev/null 2>&1 &&
16842 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16843 as_expr=expr
16844else
16845 as_expr=false
16846fi
16847
16848if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16849 as_basename=basename
16850else
16851 as_basename=false
16852fi
16853
Matthias Kloseb9621712010-04-24 17:59:49 +000016854if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16855 as_dirname=dirname
16856else
16857 as_dirname=false
16858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860as_me=`$as_basename -- "$0" ||
16861$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16862 X"$0" : 'X\(//\)$' \| \
16863 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016864$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865 sed '/^.*\/\([^/][^/]*\)\/*$/{
16866 s//\1/
16867 q
16868 }
16869 /^X\/\(\/\/\)$/{
16870 s//\1/
16871 q
16872 }
16873 /^X\/\(\/\).*/{
16874 s//\1/
16875 q
16876 }
16877 s/.*/./; q'`
16878
Matthias Kloseb9621712010-04-24 17:59:49 +000016879# Avoid depending upon Character Ranges.
16880as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16881as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16882as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16883as_cr_digits='0123456789'
16884as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885
16886ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016887case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016889 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016891 xy) ECHO_C='\c';;
16892 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16893 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894 esac;;
16895*)
16896 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016898
Martin v. Löwis11437992002-04-12 09:54:03 +000016899rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900if test -d conf$$.dir; then
16901 rm -f conf$$.dir/conf$$.file
16902else
16903 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016906if (echo >conf$$.file) 2>/dev/null; then
16907 if ln -s conf$$.file conf$$ 2>/dev/null; then
16908 as_ln_s='ln -s'
16909 # ... but there are two gotchas:
16910 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16911 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016912 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016913 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016914 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016915 elif ln conf$$.file conf$$ 2>/dev/null; then
16916 as_ln_s=ln
16917 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016918 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016919 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016920else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016921 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16924rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016925
Matthias Kloseb9621712010-04-24 17:59:49 +000016926
16927# as_fn_mkdir_p
16928# -------------
16929# Create "$as_dir" as a directory, including parents if necessary.
16930as_fn_mkdir_p ()
16931{
16932
16933 case $as_dir in #(
16934 -*) as_dir=./$as_dir;;
16935 esac
16936 test -d "$as_dir" || eval $as_mkdir_p || {
16937 as_dirs=
16938 while :; do
16939 case $as_dir in #(
16940 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16941 *) as_qdir=$as_dir;;
16942 esac
16943 as_dirs="'$as_qdir' $as_dirs"
16944 as_dir=`$as_dirname -- "$as_dir" ||
16945$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16946 X"$as_dir" : 'X\(//\)[^/]' \| \
16947 X"$as_dir" : 'X\(//\)$' \| \
16948 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16949$as_echo X"$as_dir" |
16950 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16951 s//\1/
16952 q
16953 }
16954 /^X\(\/\/\)[^/].*/{
16955 s//\1/
16956 q
16957 }
16958 /^X\(\/\/\)$/{
16959 s//\1/
16960 q
16961 }
16962 /^X\(\/\).*/{
16963 s//\1/
16964 q
16965 }
16966 s/.*/./; q'`
16967 test -d "$as_dir" && break
16968 done
16969 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016970 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016971
16972
16973} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016974if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016975 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016976else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016977 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016978 as_mkdir_p=false
16979fi
16980
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016981
16982# as_fn_executable_p FILE
16983# -----------------------
16984# Test if FILE is an executable regular file.
16985as_fn_executable_p ()
16986{
16987 test -f "$1" && test -x "$1"
16988} # as_fn_executable_p
16989as_test_x='test -x'
16990as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016991
16992# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016993as_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 +000016994
16995# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016996as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016997
16998
Martin v. Löwis11437992002-04-12 09:54:03 +000016999exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017000## ----------------------------------- ##
17001## Main body of $CONFIG_STATUS script. ##
17002## ----------------------------------- ##
17003_ASEOF
17004test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017005
Matthias Kloseb9621712010-04-24 17:59:49 +000017006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17007# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017008# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009# values after options handling.
17010ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017011This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017012generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017013
17014 CONFIG_FILES = $CONFIG_FILES
17015 CONFIG_HEADERS = $CONFIG_HEADERS
17016 CONFIG_LINKS = $CONFIG_LINKS
17017 CONFIG_COMMANDS = $CONFIG_COMMANDS
17018 $ $0 $@
17019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020on `(hostname || uname -n) 2>/dev/null | sed 1q`
17021"
17022
Martin v. Löwis11437992002-04-12 09:54:03 +000017023_ACEOF
17024
Matthias Kloseb9621712010-04-24 17:59:49 +000017025case $ac_config_files in *"
17026"*) set x $ac_config_files; shift; ac_config_files=$*;;
17027esac
17028
17029case $ac_config_headers in *"
17030"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17031esac
17032
17033
17034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017035# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017036config_files="$ac_config_files"
17037config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017040
Matthias Kloseb9621712010-04-24 17:59:49 +000017041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017042ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017043\`$as_me' instantiates files and other configuration actions
17044from templates according to the current configuration. Unless the files
17045and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017046
Matthias Kloseb9621712010-04-24 17:59:49 +000017047Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017048
17049 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017051 --config print configuration, then exit
17052 -q, --quiet, --silent
17053 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 -d, --debug don't remove temporary files
17055 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 --file=FILE[:TEMPLATE]
17057 instantiate the configuration file FILE
17058 --header=FILE[:TEMPLATE]
17059 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017060
17061Configuration files:
17062$config_files
17063
17064Configuration headers:
17065$config_headers
17066
Matthias Kloseb9621712010-04-24 17:59:49 +000017067Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017070cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17071ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017072ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017073python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017074configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017075 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017076
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017077Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017078This config.status script is free software; the Free Software Foundation
17079gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080
17081ac_pwd='$ac_pwd'
17082srcdir='$srcdir'
17083INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017084MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017085test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017086_ACEOF
17087
Matthias Kloseb9621712010-04-24 17:59:49 +000017088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17089# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017090ac_need_defaults=:
17091while test $# != 0
17092do
17093 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017094 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17096 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017097 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017098 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017099 --*=)
17100 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17101 ac_optarg=
17102 ac_shift=:
17103 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017105 ac_option=$1
17106 ac_optarg=$2
17107 ac_shift=shift
17108 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 esac
17110
Skip Montanaro6dead952003-09-25 14:50:04 +000017111 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017113 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17114 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017116 $as_echo "$ac_cs_version"; exit ;;
17117 --config | --confi | --conf | --con | --co | --c )
17118 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017120 debug=: ;;
17121 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017122 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017123 case $ac_optarg in
17124 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017125 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017126 esac
17127 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 ac_need_defaults=false;;
17129 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017130 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 case $ac_optarg in
17132 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17133 esac
17134 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017135 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 --he | --h)
17137 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017138 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017139Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017141 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17143 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17144 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017145
17146 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017147 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017148Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017149
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
17153 esac
17154 shift
17155done
17156
Skip Montanaro6dead952003-09-25 14:50:04 +000017157ac_configure_extra_args=
17158
17159if $ac_cs_silent; then
17160 exec 6>/dev/null
17161 ac_configure_extra_args="$ac_configure_extra_args --silent"
17162fi
17163
17164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017165cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017166if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017167 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017168 shift
17169 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17170 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017172 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017173fi
17174
Martin v. Löwis11437992002-04-12 09:54:03 +000017175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177exec 5>>config.log
17178{
17179 echo
17180 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17181## Running $as_me. ##
17182_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017183 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017187cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017189
Matthias Kloseb9621712010-04-24 17:59:49 +000017190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191
17192# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017193for ac_config_target in $ac_config_targets
17194do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195 case $ac_config_target in
17196 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17197 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17198 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017199 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17200 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17202 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017203 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017204 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017205 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206
Victor Stinnere0be4232011-10-25 13:06:09 +020017207 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 esac
17209done
17210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211
Martin v. Löwis11437992002-04-12 09:54:03 +000017212# If the user did not use the arguments to specify the items to instantiate,
17213# then the envvar interface is used. Set only those that are not.
17214# We use the long form for the default assignment because of an extremely
17215# bizarre bug on SunOS 4.1.3.
17216if $ac_need_defaults; then
17217 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17218 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17219fi
17220
Skip Montanaro6dead952003-09-25 14:50:04 +000017221# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017223# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224# Hook for its removal unless debugging.
17225# Note that there is a small window in which the directory will not be cleaned:
17226# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017227$debug ||
17228{
Victor Stinnere0be4232011-10-25 13:06:09 +020017229 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017231 : "${ac_tmp:=$tmp}"
17232 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017233' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017234 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017235}
Martin v. Löwis11437992002-04-12 09:54:03 +000017236# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017237
Martin v. Löwis11437992002-04-12 09:54:03 +000017238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017240 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017241} ||
17242{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017243 tmp=./conf$$-$RANDOM
17244 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017245} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017246ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017247
Matthias Kloseb9621712010-04-24 17:59:49 +000017248# Set up the scripts for CONFIG_FILES section.
17249# No need to generate them if there are no CONFIG_FILES.
17250# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017251if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017252
Matthias Kloseb9621712010-04-24 17:59:49 +000017253
17254ac_cr=`echo X | tr X '\015'`
17255# On cygwin, bash can eat \r inside `` if the user requested igncr.
17256# But we know of no other shell where ac_cr would be empty at this
17257# point, so we can use a bashism as a fallback.
17258if test "x$ac_cr" = x; then
17259 eval ac_cr=\$\'\\r\'
17260fi
17261ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17262if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017263 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017264else
17265 ac_cs_awk_cr=$ac_cr
17266fi
17267
Victor Stinnere0be4232011-10-25 13:06:09 +020017268echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017269_ACEOF
17270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271
Matthias Kloseb9621712010-04-24 17:59:49 +000017272{
17273 echo "cat >conf$$subs.awk <<_ACEOF" &&
17274 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17275 echo "_ACEOF"
17276} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17278ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279ac_delim='%!_!# '
17280for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017281 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017282 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283
Matthias Kloseb9621712010-04-24 17:59:49 +000017284 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17285 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286 break
17287 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017288 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 else
17290 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017291 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292done
Matthias Kloseb9621712010-04-24 17:59:49 +000017293rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294
Matthias Kloseb9621712010-04-24 17:59:49 +000017295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017296cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017298sed -n '
17299h
17300s/^/S["/; s/!.*/"]=/
17301p
17302g
17303s/^[^!]*!//
17304:repl
17305t repl
17306s/'"$ac_delim"'$//
17307t delim
17308:nl
17309h
17310s/\(.\{148\}\)..*/\1/
17311t more1
17312s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17313p
17314n
17315b repl
17316:more1
17317s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17318p
17319g
17320s/.\{148\}//
17321t nl
17322:delim
17323h
17324s/\(.\{148\}\)..*/\1/
17325t more2
17326s/["\\]/\\&/g; s/^/"/; s/$/"/
17327p
17328b
17329:more2
17330s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17331p
17332g
17333s/.\{148\}//
17334t delim
17335' <conf$$subs.awk | sed '
17336/^[^""]/{
17337 N
17338 s/\n//
17339}
17340' >>$CONFIG_STATUS || ac_write_fail=1
17341rm -f conf$$subs.awk
17342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17343_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017344cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017345 for (key in S) S_is_set[key] = 1
17346 FS = ""
17347
17348}
17349{
17350 line = $ 0
17351 nfields = split(line, field, "@")
17352 substed = 0
17353 len = length(field[1])
17354 for (i = 2; i < nfields; i++) {
17355 key = field[i]
17356 keylen = length(key)
17357 if (S_is_set[key]) {
17358 value = S[key]
17359 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17360 len += length(value) + length(field[++i])
17361 substed = 1
17362 } else
17363 len += 1 + keylen
17364 }
17365
17366 print line
17367}
17368
17369_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017371cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17372if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17373 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17374else
17375 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017376fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017377 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017378_ACEOF
17379
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017380# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17381# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382# trailing colons and then remove the whole line if VPATH becomes empty
17383# (actually we leave an empty line to preserve line numbers).
17384if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017385 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17386h
17387s///
17388s/^/:/
17389s/[ ]*$/:/
17390s/:\$(srcdir):/:/g
17391s/:\${srcdir}:/:/g
17392s/:@srcdir@:/:/g
17393s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017395x
17396s/\(=[ ]*\).*/\1/
17397G
17398s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399s/^[^=]*=[ ]*$//
17400}'
17401fi
17402
Matthias Kloseb9621712010-04-24 17:59:49 +000017403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017404fi # test -n "$CONFIG_FILES"
17405
Matthias Kloseb9621712010-04-24 17:59:49 +000017406# Set up the scripts for CONFIG_HEADERS section.
17407# No need to generate them if there are no CONFIG_HEADERS.
17408# This happens for instance with `./config.status Makefile'.
17409if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017410cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017411BEGIN {
17412_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413
Matthias Kloseb9621712010-04-24 17:59:49 +000017414# Transform confdefs.h into an awk script `defines.awk', embedded as
17415# here-document in config.status, that substitutes the proper values into
17416# config.h.in to produce config.h.
17417
17418# Create a delimiter string that does not exist in confdefs.h, to ease
17419# handling of long lines.
17420ac_delim='%!_!# '
17421for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017422 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17423 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017424 break
17425 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017426 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017427 else
17428 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17429 fi
17430done
17431
17432# For the awk script, D is an array of macro values keyed by name,
17433# likewise P contains macro parameters if any. Preserve backslash
17434# newline sequences.
17435
17436ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17437sed -n '
17438s/.\{148\}/&'"$ac_delim"'/g
17439t rset
17440:rset
17441s/^[ ]*#[ ]*define[ ][ ]*/ /
17442t def
17443d
17444:def
17445s/\\$//
17446t bsnl
17447s/["\\]/\\&/g
17448s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17449D["\1"]=" \3"/p
17450s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17451d
17452:bsnl
17453s/["\\]/\\&/g
17454s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17455D["\1"]=" \3\\\\\\n"\\/p
17456t cont
17457s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17458t cont
17459d
17460:cont
17461n
17462s/.\{148\}/&'"$ac_delim"'/g
17463t clear
17464:clear
17465s/\\$//
17466t bsnlc
17467s/["\\]/\\&/g; s/^/"/; s/$/"/p
17468d
17469:bsnlc
17470s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17471b cont
17472' <confdefs.h | sed '
17473s/'"$ac_delim"'/"\\\
17474"/g' >>$CONFIG_STATUS || ac_write_fail=1
17475
17476cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17477 for (key in D) D_is_set[key] = 1
17478 FS = ""
17479}
17480/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17481 line = \$ 0
17482 split(line, arg, " ")
17483 if (arg[1] == "#") {
17484 defundef = arg[2]
17485 mac1 = arg[3]
17486 } else {
17487 defundef = substr(arg[1], 2)
17488 mac1 = arg[2]
17489 }
17490 split(mac1, mac2, "(") #)
17491 macro = mac2[1]
17492 prefix = substr(line, 1, index(line, defundef) - 1)
17493 if (D_is_set[macro]) {
17494 # Preserve the white space surrounding the "#".
17495 print prefix "define", macro P[macro] D[macro]
17496 next
17497 } else {
17498 # Replace #undef with comments. This is necessary, for example,
17499 # in the case of _POSIX_SOURCE, which is predefined and required
17500 # on some systems where configure will not decide to define it.
17501 if (defundef == "undef") {
17502 print "/*", prefix defundef, macro, "*/"
17503 next
17504 }
17505 }
17506}
17507{ print }
17508_ACAWK
17509_ACEOF
17510cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017511 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017512fi # test -n "$CONFIG_HEADERS"
17513
17514
17515eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17516shift
17517for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518do
17519 case $ac_tag in
17520 :[FHLC]) ac_mode=$ac_tag; continue;;
17521 esac
17522 case $ac_mode$ac_tag in
17523 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017524 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525 :[FH]-) ac_tag=-:-;;
17526 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17527 esac
17528 ac_save_IFS=$IFS
17529 IFS=:
17530 set x $ac_tag
17531 IFS=$ac_save_IFS
17532 shift
17533 ac_file=$1
17534 shift
17535
17536 case $ac_mode in
17537 :L) ac_source=$1;;
17538 :[FH])
17539 ac_file_inputs=
17540 for ac_f
17541 do
17542 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017543 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544 *) # Look for the file first in the build tree, then in the source tree
17545 # (if the path is not absolute). The absolute path cannot be DOS-style,
17546 # because $ac_f cannot contain `:'.
17547 test -f "$ac_f" ||
17548 case $ac_f in
17549 [\\/$]*) false;;
17550 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17551 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017552 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017554 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17555 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556 done
17557
17558 # Let's still pretend it is `configure' which instantiates (i.e., don't
17559 # use $as_me), people would be surprised to read:
17560 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017561 configure_input='Generated from '`
17562 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17563 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564 if test x"$ac_file" != x-; then
17565 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017566 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17567$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017569 # Neutralize special characters interpreted by sed in replacement strings.
17570 case $configure_input in #(
17571 *\&* | *\|* | *\\* )
17572 ac_sed_conf_input=`$as_echo "$configure_input" |
17573 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17574 *) ac_sed_conf_input=$configure_input;;
17575 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017576
17577 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017578 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17579 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580 esac
17581 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 esac
17583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017585$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017586 X"$ac_file" : 'X\(//\)[^/]' \| \
17587 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017589$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17591 s//\1/
17592 q
17593 }
17594 /^X\(\/\/\)[^/].*/{
17595 s//\1/
17596 q
17597 }
17598 /^X\(\/\/\)$/{
17599 s//\1/
17600 q
17601 }
17602 /^X\(\/\).*/{
17603 s//\1/
17604 q
17605 }
17606 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017608 ac_builddir=.
17609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017610case "$ac_dir" in
17611.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17612*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017613 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017615 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616 case $ac_top_builddir_sub in
17617 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17618 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17619 esac ;;
17620esac
17621ac_abs_top_builddir=$ac_pwd
17622ac_abs_builddir=$ac_pwd$ac_dir_suffix
17623# for backward compatibility:
17624ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017625
17626case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017627 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017628 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629 ac_top_srcdir=$ac_top_builddir_sub
17630 ac_abs_top_srcdir=$ac_pwd ;;
17631 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017632 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 ac_top_srcdir=$srcdir
17634 ac_abs_top_srcdir=$srcdir ;;
17635 *) # Relative name.
17636 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17637 ac_top_srcdir=$ac_top_build_prefix$srcdir
17638 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017639esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017641
Martin v. Löwis11437992002-04-12 09:54:03 +000017642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 case $ac_mode in
17644 :F)
17645 #
17646 # CONFIG_FILE
17647 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017648
17649 case $INSTALL in
17650 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017651 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017653 ac_MKDIR_P=$MKDIR_P
17654 case $MKDIR_P in
17655 [\\/$]* | ?:[\\/]* ) ;;
17656 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17657 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017658_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659
Matthias Kloseb9621712010-04-24 17:59:49 +000017660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661# If the template does not know about datarootdir, expand it.
17662# FIXME: This hack should be removed a few years after 2.60.
17663ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017664ac_sed_dataroot='
17665/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666 p
17667 q
17668}
17669/@datadir@/p
17670/@docdir@/p
17671/@infodir@/p
17672/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017673/@mandir@/p'
17674case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675*datarootdir*) ac_datarootdir_seen=yes;;
17676*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17678$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681 ac_datarootdir_hack='
17682 s&@datadir@&$datadir&g
17683 s&@docdir@&$docdir&g
17684 s&@infodir@&$infodir&g
17685 s&@localedir@&$localedir&g
17686 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017687 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688esac
17689_ACEOF
17690
17691# Neutralize VPATH when `$srcdir' = `.'.
17692# Shell code in configure.ac might set extrasub.
17693# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17695ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017696$extrasub
17697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017698cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017699:t
17700/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017701s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017703s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704s&@srcdir@&$ac_srcdir&;t t
17705s&@abs_srcdir@&$ac_abs_srcdir&;t t
17706s&@top_srcdir@&$ac_top_srcdir&;t t
17707s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17708s&@builddir@&$ac_builddir&;t t
17709s&@abs_builddir@&$ac_abs_builddir&;t t
17710s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17711s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017712s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017714"
Victor Stinnere0be4232011-10-25 13:06:09 +020017715eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17716 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017719 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17720 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17721 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017723which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017724$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017725which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017726
Victor Stinnere0be4232011-10-25 13:06:09 +020017727 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017728 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017729 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17730 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017731 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017732 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 ;;
17734 :H)
17735 #
17736 # CONFIG_HEADER
17737 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017738 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017739 {
17740 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017741 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17742 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017743 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017744 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17746$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017748 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017749 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017750 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017751 fi
17752 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017754 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017755 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759
17760 esac
17761
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017762
17763 case $ac_file$ac_mode in
17764 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17765
17766 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767done # for ac_tag
17768
Guido van Rossum627b2d71993-12-24 10:39:16 +000017769
Matthias Kloseb9621712010-04-24 17:59:49 +000017770as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017771_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017772ac_clean_files=$ac_clean_files_save
17773
Matthias Kloseb9621712010-04-24 17:59:49 +000017774test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017775 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017776
Martin v. Löwis11437992002-04-12 09:54:03 +000017777
17778# configure is writing to config.log, and then calls config.status.
17779# config.status does its own redirection, appending to config.log.
17780# Unfortunately, on DOS this fails, as config.log is still kept open
17781# by configure, so config.status won't be able to write to it; its
17782# output is simply discarded. So we exec the FD to /dev/null,
17783# effectively closing config.log, so it can be properly (re)opened and
17784# appended to by config.status. When coming back to configure, we
17785# need to make the FD available again.
17786if test "$no_create" != yes; then
17787 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017788 ac_config_status_args=
17789 test "$silent" = yes &&
17790 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017791 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017792 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017793 exec 5>>config.log
17794 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17795 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017796 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017797fi
17798if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17800$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017801fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017802
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017803
Christian Heimes75ed8902013-11-20 01:11:18 +010017804echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017805if test ! -f Modules/Setup
17806then
17807 cp $srcdir/Modules/Setup.dist Modules/Setup
17808fi
17809
Christian Heimes75ed8902013-11-20 01:11:18 +010017810echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017811if test ! -f Modules/Setup.local
17812then
17813 echo "# Edit this file for local setup changes" >Modules/Setup.local
17814fi
17815
Christian Heimes75ed8902013-11-20 01:11:18 +010017816echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017817$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17818 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017819 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017820mv config.c Modules