blob: 10fe15dcdc5e72756c2d7b18691fad802ebda801 [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.
Yury Selivanov7aa53412015-05-30 10:57:56 -04003# Generated by GNU Autoconf 2.69 for python 3.5.
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'
Yury Selivanov7aa53412015-05-30 10:57:56 -0400583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
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
Benjamin Petersonb8a2f512016-07-06 23:55:15 -0700779runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000780localstatedir
781sharedstatedir
782sysconfdir
783datadir
784datarootdir
785libexecdir
786sbindir
787bindir
788program_transform_name
789prefix
790exec_prefix
791PACKAGE_URL
792PACKAGE_BUGREPORT
793PACKAGE_STRING
794PACKAGE_VERSION
795PACKAGE_TARNAME
796PACKAGE_NAME
797PATH_SEPARATOR
798SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000799ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000800ac_user_opts='
801enable_option_checking
802enable_universalsdk
803with_universal_archs
804with_framework_name
805enable_framework
806with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600807with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_cxx_main
809with_suffix
810enable_shared
811enable_profiling
812with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700813with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100814with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100815with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_libs
817with_system_expat
818with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100819with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000820enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700821with_tcltk_includes
822with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_dbmliborder
824with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_threads
826with_thread
827enable_ipv6
828with_doc_strings
829with_tsc
830with_pymalloc
831with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_fpectl
833with_libm
834with_libc
835enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800837with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000838'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 ac_precious_vars='build_alias
840host_alias
841target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100842MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843CC
844CFLAGS
845LDFLAGS
846LIBS
847CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100848CPP
849PKG_CONFIG
850PKG_CONFIG_PATH
851PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852
Guido van Rossum627b2d71993-12-24 10:39:16 +0000853
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000855ac_init_help=
856ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000857ac_unrecognized_opts=
858ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859# The variables have the same names as the options, with
860# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000861cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864no_recursion=
865prefix=NONE
866program_prefix=NONE
867program_suffix=NONE
868program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873x_includes=NONE
874x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000875
876# Installation directory options.
877# These are left unexpanded so users can "make install exec_prefix=/foo"
878# and all the variables that are supposed to be based on exec_prefix
879# by default will actually change.
880# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882bindir='${exec_prefix}/bin'
883sbindir='${exec_prefix}/sbin'
884libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885datarootdir='${prefix}/share'
886datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887sysconfdir='${prefix}/etc'
888sharedstatedir='${prefix}/com'
889localstatedir='${prefix}/var'
Benjamin Petersonb8a2f512016-07-06 23:55:15 -0700890runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891includedir='${prefix}/include'
892oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
894infodir='${datarootdir}/info'
895htmldir='${docdir}'
896dvidir='${docdir}'
897pdfdir='${docdir}'
898psdir='${docdir}'
899libdir='${exec_prefix}/lib'
900localedir='${datarootdir}/locale'
901mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000906do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 # If the previous option needs an argument, assign it.
908 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 ac_prev=
911 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200915 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
916 *=) ac_optarg= ;;
917 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 # Accept the important Cygnus configure options, so we can diagnose typos.
921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_dashdash$ac_option in
923 --)
924 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926 -bindir | --bindir | --bindi | --bind | --bin | --bi)
927 ac_prev=bindir ;;
928 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
931 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 -cache-file | --cache-file | --cache-fil | --cache-fi \
937 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
938 ac_prev=cache_file ;;
939 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
940 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 cache_file=$ac_optarg ;;
942
943 --config-cache | -C)
944 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
952 | --dataroo | --dataro | --datar)
953 ac_prev=datarootdir ;;
954 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
955 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
956 datarootdir=$ac_optarg ;;
957
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200962 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973
974 -docdir | --docdir | --docdi | --doc | --do)
975 ac_prev=docdir ;;
976 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
977 docdir=$ac_optarg ;;
978
979 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
980 ac_prev=dvidir ;;
981 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
982 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200988 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 ac_useropt_orig=$ac_useropt
990 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991 case $ac_user_opts in
992 *"
993"enable_$ac_useropt"
994"*) ;;
995 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
996 ac_unrecognized_sep=', ';;
997 esac
998 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1001 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1002 | --exec | --exe | --ex)
1003 ac_prev=exec_prefix ;;
1004 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1005 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1006 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 # Obsolete; use --with-gas.
1011 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 -help | --help | --hel | --he | -h)
1014 ac_init_help=long ;;
1015 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1016 ac_init_help=recursive ;;
1017 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1018 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001025 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1026 ac_prev=htmldir ;;
1027 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1028 | --ht=*)
1029 htmldir=$ac_optarg ;;
1030
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031 -includedir | --includedir | --includedi | --included | --include \
1032 | --includ | --inclu | --incl | --inc)
1033 ac_prev=includedir ;;
1034 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1035 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
1038 -infodir | --infodir | --infodi | --infod | --info | --inf)
1039 ac_prev=infodir ;;
1040 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -libdir | --libdir | --libdi | --libd)
1044 ac_prev=libdir ;;
1045 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1049 | --libexe | --libex | --libe)
1050 ac_prev=libexecdir ;;
1051 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1052 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001055 -localedir | --localedir | --localedi | --localed | --locale)
1056 ac_prev=localedir ;;
1057 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1058 localedir=$ac_optarg ;;
1059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 ac_prev=localstatedir ;;
1063 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
1067 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1068 ac_prev=mandir ;;
1069 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073 # Obsolete; use --without-fp.
1074 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 no_create=yes ;;
1079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1081 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1082 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1085 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1086 | --oldin | --oldi | --old | --ol | --o)
1087 ac_prev=oldincludedir ;;
1088 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1089 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1090 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1094 ac_prev=prefix ;;
1095 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1099 | --program-pre | --program-pr | --program-p)
1100 ac_prev=program_prefix ;;
1101 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1102 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1106 | --program-suf | --program-su | --program-s)
1107 ac_prev=program_suffix ;;
1108 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1109 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-transform-name | --program-transform-name \
1113 | --program-transform-nam | --program-transform-na \
1114 | --program-transform-n | --program-transform- \
1115 | --program-transform | --program-transfor \
1116 | --program-transfo | --program-transf \
1117 | --program-trans | --program-tran \
1118 | --progr-tra | --program-tr | --program-t)
1119 ac_prev=program_transform_name ;;
1120 -program-transform-name=* | --program-transform-name=* \
1121 | --program-transform-nam=* | --program-transform-na=* \
1122 | --program-transform-n=* | --program-transform-=* \
1123 | --program-transform=* | --program-transfor=* \
1124 | --program-transfo=* | --program-transf=* \
1125 | --program-trans=* | --program-tran=* \
1126 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001129 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1130 ac_prev=pdfdir ;;
1131 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1132 pdfdir=$ac_optarg ;;
1133
1134 -psdir | --psdir | --psdi | --psd | --ps)
1135 ac_prev=psdir ;;
1136 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1137 psdir=$ac_optarg ;;
1138
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1140 | -silent | --silent | --silen | --sile | --sil)
1141 silent=yes ;;
1142
Benjamin Petersonb8a2f512016-07-06 23:55:15 -07001143 -runstatedir | --runstatedir | --runstatedi | --runstated \
1144 | --runstate | --runstat | --runsta | --runst | --runs \
1145 | --run | --ru | --r)
1146 ac_prev=runstatedir ;;
1147 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1148 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1149 | --run=* | --ru=* | --r=*)
1150 runstatedir=$ac_optarg ;;
1151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1153 ac_prev=sbindir ;;
1154 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1155 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
1158 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1159 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1160 | --sharedst | --shareds | --shared | --share | --shar \
1161 | --sha | --sh)
1162 ac_prev=sharedstatedir ;;
1163 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1164 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1165 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1166 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 -site | --site | --sit)
1170 ac_prev=site ;;
1171 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1175 ac_prev=srcdir ;;
1176 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1180 | --syscon | --sysco | --sysc | --sys | --sy)
1181 ac_prev=sysconfdir ;;
1182 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1183 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1192 verbose=yes ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 -version | --version | --versio | --versi | --vers | -V)
1195 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001201 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt_orig=$ac_useropt
1203 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204 case $ac_user_opts in
1205 *"
1206"with_$ac_useropt"
1207"*) ;;
1208 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1209 ac_unrecognized_sep=', ';;
1210 esac
1211 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
1213 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
1226 esac
1227 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229 --x)
1230 # Obsolete; use --with-x.
1231 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
1233 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1234 | --x-incl | --x-inc | --x-in | --x-i)
1235 ac_prev=x_includes ;;
1236 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1237 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1241 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1242 ac_prev=x_libraries ;;
1243 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1244 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1248Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249 ;;
1250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 *=*)
1252 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1253 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 case $ac_envvar in #(
1255 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 export $ac_envvar ;;
1260
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001261 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001266 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 ;;
1268
1269 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270done
1271
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275fi
1276
Matthias Kloseb9621712010-04-24 17:59:49 +00001277if test -n "$ac_unrecognized_opts"; then
1278 case $enable_option_checking in
1279 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1282 esac
1283fi
1284
1285# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1287 datadir sysconfdir sharedstatedir localstatedir includedir \
1288 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonb8a2f512016-07-06 23:55:15 -07001289 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001292 # Remove trailing slashes.
1293 case $ac_val in
1294 */ )
1295 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1296 eval $ac_var=\$ac_val;;
1297 esac
1298 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001299 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 [\\/$]* | ?:[\\/]* ) continue;;
1301 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001302 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001304done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306# There might be people who depend on the old broken behavior: `$host'
1307# used to hold the argument of --host etc.
1308# FIXME: To remove some day.
1309build=$build_alias
1310host=$host_alias
1311target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# FIXME: To remove some day.
1314if test "x$host_alias" != x; then
1315 if test "x$build_alias" = x; then
1316 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 elif test "x$build_alias" != "x$host_alias"; then
1318 cross_compiling=yes
1319 fi
1320fi
1321
1322ac_tool_prefix=
1323test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325test "$silent" = yes && exec 6>/dev/null
1326
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329ac_ls_di=`ls -di .` &&
1330ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336# Find the source files, if location was not specified.
1337if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 ac_confdir=`$as_dirname -- "$as_myself" ||
1341$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342 X"$as_myself" : 'X\(//\)[^/]' \| \
1343 X"$as_myself" : 'X\(//\)$' \| \
1344 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)[^/].*/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\).*/{
1359 s//\1/
1360 q
1361 }
1362 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001363 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365 srcdir=..
1366 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367else
1368 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370if test ! -r "$srcdir/$ac_unique_file"; then
1371 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 pwd)`
1378# When building in place, set srcdir=.
1379if test "$ac_abs_confdir" = "$ac_pwd"; then
1380 srcdir=.
1381fi
1382# Remove unnecessary trailing slashes from srcdir.
1383# Double slashes in file names in object file debugging info
1384# mess up M-x gdb in Emacs.
1385case $srcdir in
1386*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387esac
1388for ac_var in $ac_precious_vars; do
1389 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_env_${ac_var}_value=\$${ac_var}
1391 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395#
1396# Report the --help message.
1397#
1398if test "$ac_init_help" = "long"; then
1399 # Omit some internal or obsolete options to make the list less imposing.
1400 # This message is too long to be a string in the A/UX 3.1 sh.
1401 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001402\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407VAR=VALUE. See below for descriptions of some of the useful variables.
1408
1409Defaults for the options are specified in brackets.
1410
1411Configuration:
1412 -h, --help display this help and exit
1413 --help=short display options specific to this package
1414 --help=recursive display the short help of all the included packages
1415 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001416 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 --cache-file=FILE cache test results in FILE [disabled]
1418 -C, --config-cache alias for \`--cache-file=config.cache'
1419 -n, --no-create do not create output files
1420 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1421
Martin v. Löwis11437992002-04-12 09:54:03 +00001422Installation directories:
1423 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428By default, \`make install' will install all the files in
1429\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1430an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431for instance \`--prefix=\$HOME'.
1432
1433For better control, use the options below.
1434
1435Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 --bindir=DIR user executables [EPREFIX/bin]
1437 --sbindir=DIR system admin executables [EPREFIX/sbin]
1438 --libexecdir=DIR program executables [EPREFIX/libexec]
1439 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1440 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1441 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonb8a2f512016-07-06 23:55:15 -07001442 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --libdir=DIR object code libraries [EPREFIX/lib]
1444 --includedir=DIR C header files [PREFIX/include]
1445 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1446 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1447 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1448 --infodir=DIR info documentation [DATAROOTDIR/info]
1449 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1450 --mandir=DIR man documentation [DATAROOTDIR/man]
1451 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1452 --htmldir=DIR html documentation [DOCDIR]
1453 --dvidir=DIR dvi documentation [DOCDIR]
1454 --pdfdir=DIR pdf documentation [DOCDIR]
1455 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001456_ACEOF
1457
1458 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001459
1460System types:
1461 --build=BUILD configure for building on BUILD [guessed]
1462 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464fi
1465
1466if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001468 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 cat <<\_ACEOF
1471
1472Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1475 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001476 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001477 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --enable-framework[=INSTALLDIR]
1479 Build (MacOSX|Darwin) framework
1480 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001481 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001482 --enable-loadable-sqlite-extensions
1483 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-ipv6 Enable ipv6 (with ipv4) support
1485 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001486 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001487 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001488
1489Optional Packages:
1490 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1491 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001492 --with-universal-archs=ARCH
1493 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001494 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001499 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001500 --with-cxx-main=<compiler>
1501 compile main() and link python executable with C++
1502 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-suffix=.exe set executable suffix
1504 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001505 --with-lto Enable Link Time Optimization in PGO builds.
1506 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001507 --with-hash-algorithm=[fnv|siphash24]
1508 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001509 --with-address-sanitizer
1510 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001512 --with-system-expat build pyexpat module using an installed expat
1513 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001514 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001515 --with-system-libmpdec build _decimal module using an installed libmpdec
1516 library
Ned Deilyd819b932013-09-06 01:07:05 -07001517 --with-tcltk-includes='-I...'
1518 override search for Tcl and Tk include files
1519 --with-tcltk-libs='-L...'
1520 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001521 --with-dbmliborder=db1:db2:...
1522 order to check db backends for dbm. Valid value is a
1523 colon separated string with the backend names
1524 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with(out)-threads[=DIRECTORY]
1527 disable/enable thread support
1528 --with(out)-thread[=DIRECTORY]
1529 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001531 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001533 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --with-fpectl enable SIGFPE catching
1535 --with-libm=STRING math library
1536 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001537 --with(out)-computed-gotos
1538 Use computed gotos in evaluation loop (enabled by
1539 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001540 --with(out)-ensurepip=[=upgrade]
1541 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001542
1543Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001544 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001545 CC C compiler command
1546 CFLAGS C compiler flags
1547 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1548 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001550 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001553 PKG_CONFIG path to pkg-config utility
1554 PKG_CONFIG_PATH
1555 directories to add to pkg-config's search path
1556 PKG_CONFIG_LIBDIR
1557 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
1559Use these variables to override the choices made by `configure' or to help
1560it to find libraries and programs with nonstandard names/locations.
1561
Georg Brandle2e15612009-05-20 18:25:10 +00001562Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001563_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001565fi
1566
1567if test "$ac_init_help" = "recursive"; then
1568 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 test -d "$ac_dir" ||
1571 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1572 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 ac_builddir=.
1574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575case "$ac_dir" in
1576.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1577*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 case $ac_top_builddir_sub in
1582 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1584 esac ;;
1585esac
1586ac_abs_top_builddir=$ac_pwd
1587ac_abs_builddir=$ac_pwd$ac_dir_suffix
1588# for backward compatibility:
1589ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001590
1591case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 ac_top_srcdir=$ac_top_builddir_sub
1595 ac_abs_top_srcdir=$ac_pwd ;;
1596 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 ac_top_srcdir=$srcdir
1599 ac_abs_top_srcdir=$srcdir ;;
1600 *) # Relative name.
1601 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1602 ac_top_srcdir=$ac_top_build_prefix$srcdir
1603 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001604esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 cd "$ac_dir" || { ac_status=$?; continue; }
1608 # Check for guested configure.
1609 if test -f "$ac_srcdir/configure.gnu"; then
1610 echo &&
1611 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1612 elif test -f "$ac_srcdir/configure"; then
1613 echo &&
1614 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001616 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 fi || ac_status=$?
1618 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 done
1620fi
1621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001623if $ac_init_version; then
1624 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001625python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001626generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001627
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001628Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001629This configure script is free software; the Free Software Foundation
1630gives unlimited permission to copy, distribute and modify it.
1631_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001634
1635## ------------------------ ##
1636## Autoconf initialization. ##
1637## ------------------------ ##
1638
1639# ac_fn_c_try_compile LINENO
1640# --------------------------
1641# Try to compile conftest.$ac_ext, and return whether this succeeded.
1642ac_fn_c_try_compile ()
1643{
1644 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1645 rm -f conftest.$ac_objext
1646 if { { ac_try="$ac_compile"
1647case "(($ac_try" in
1648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649 *) ac_try_echo=$ac_try;;
1650esac
1651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652$as_echo "$ac_try_echo"; } >&5
1653 (eval "$ac_compile") 2>conftest.err
1654 ac_status=$?
1655 if test -s conftest.err; then
1656 grep -v '^ *+' conftest.err >conftest.er1
1657 cat conftest.er1 >&5
1658 mv -f conftest.er1 conftest.err
1659 fi
1660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1661 test $ac_status = 0; } && {
1662 test -z "$ac_c_werror_flag" ||
1663 test ! -s conftest.err
1664 } && test -s conftest.$ac_objext; then :
1665 ac_retval=0
1666else
1667 $as_echo "$as_me: failed program was:" >&5
1668sed 's/^/| /' conftest.$ac_ext >&5
1669
1670 ac_retval=1
1671fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001672 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 as_fn_set_status $ac_retval
1674
1675} # ac_fn_c_try_compile
1676
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001677# ac_fn_c_try_cpp LINENO
1678# ----------------------
1679# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1680ac_fn_c_try_cpp ()
1681{
1682 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1683 if { { ac_try="$ac_cpp conftest.$ac_ext"
1684case "(($ac_try" in
1685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1686 *) ac_try_echo=$ac_try;;
1687esac
1688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1689$as_echo "$ac_try_echo"; } >&5
1690 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1691 ac_status=$?
1692 if test -s conftest.err; then
1693 grep -v '^ *+' conftest.err >conftest.er1
1694 cat conftest.er1 >&5
1695 mv -f conftest.er1 conftest.err
1696 fi
1697 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1698 test $ac_status = 0; } > conftest.i && {
1699 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1700 test ! -s conftest.err
1701 }; then :
1702 ac_retval=0
1703else
1704 $as_echo "$as_me: failed program was:" >&5
1705sed 's/^/| /' conftest.$ac_ext >&5
1706
1707 ac_retval=1
1708fi
1709 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1710 as_fn_set_status $ac_retval
1711
1712} # ac_fn_c_try_cpp
1713
Matthias Kloseb9621712010-04-24 17:59:49 +00001714# ac_fn_c_try_link LINENO
1715# -----------------------
1716# Try to link conftest.$ac_ext, and return whether this succeeded.
1717ac_fn_c_try_link ()
1718{
1719 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1720 rm -f conftest.$ac_objext conftest$ac_exeext
1721 if { { ac_try="$ac_link"
1722case "(($ac_try" in
1723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724 *) ac_try_echo=$ac_try;;
1725esac
1726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1727$as_echo "$ac_try_echo"; } >&5
1728 (eval "$ac_link") 2>conftest.err
1729 ac_status=$?
1730 if test -s conftest.err; then
1731 grep -v '^ *+' conftest.err >conftest.er1
1732 cat conftest.er1 >&5
1733 mv -f conftest.er1 conftest.err
1734 fi
1735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1736 test $ac_status = 0; } && {
1737 test -z "$ac_c_werror_flag" ||
1738 test ! -s conftest.err
1739 } && test -s conftest$ac_exeext && {
1740 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001741 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001742 }; then :
1743 ac_retval=0
1744else
1745 $as_echo "$as_me: failed program was:" >&5
1746sed 's/^/| /' conftest.$ac_ext >&5
1747
1748 ac_retval=1
1749fi
1750 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1751 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1752 # interfere with the next link command; also delete a directory that is
1753 # left behind by Apple's compiler. We do this before executing the actions.
1754 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001755 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 as_fn_set_status $ac_retval
1757
1758} # ac_fn_c_try_link
1759
Matthias Kloseb9621712010-04-24 17:59:49 +00001760# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1761# -------------------------------------------------------
1762# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1763# the include files in INCLUDES and setting the cache variable VAR
1764# accordingly.
1765ac_fn_c_check_header_mongrel ()
1766{
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001768 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1770$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001771if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001772 $as_echo_n "(cached) " >&6
1773fi
1774eval ac_res=\$$3
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1776$as_echo "$ac_res" >&6; }
1777else
1778 # Is the header compilable?
1779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1780$as_echo_n "checking $2 usability... " >&6; }
1781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1782/* end confdefs.h. */
1783$4
1784#include <$2>
1785_ACEOF
1786if ac_fn_c_try_compile "$LINENO"; then :
1787 ac_header_compiler=yes
1788else
1789 ac_header_compiler=no
1790fi
1791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1793$as_echo "$ac_header_compiler" >&6; }
1794
1795# Is the header present?
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1797$as_echo_n "checking $2 presence... " >&6; }
1798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1799/* end confdefs.h. */
1800#include <$2>
1801_ACEOF
1802if ac_fn_c_try_cpp "$LINENO"; then :
1803 ac_header_preproc=yes
1804else
1805 ac_header_preproc=no
1806fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001807rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1809$as_echo "$ac_header_preproc" >&6; }
1810
1811# So? What about this header?
1812case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1813 yes:no: )
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1815$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1818 ;;
1819 no:yes:* )
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1821$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1823$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1825$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1827$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1829$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001830( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001831## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001832## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001833 ) | sed "s/^/$as_me: WARNING: /" >&2
1834 ;;
1835esac
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1837$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001838if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 $as_echo_n "(cached) " >&6
1840else
1841 eval "$3=\$ac_header_compiler"
1842fi
1843eval ac_res=\$$3
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1845$as_echo "$ac_res" >&6; }
1846fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001847 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001848
1849} # ac_fn_c_check_header_mongrel
1850
1851# ac_fn_c_try_run LINENO
1852# ----------------------
1853# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1854# that executables *can* be run.
1855ac_fn_c_try_run ()
1856{
1857 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858 if { { ac_try="$ac_link"
1859case "(($ac_try" in
1860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1861 *) ac_try_echo=$ac_try;;
1862esac
1863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1864$as_echo "$ac_try_echo"; } >&5
1865 (eval "$ac_link") 2>&5
1866 ac_status=$?
1867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1868 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1869 { { case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_try") 2>&5
1876 ac_status=$?
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; }; }; then :
1879 ac_retval=0
1880else
1881 $as_echo "$as_me: program exited with status $ac_status" >&5
1882 $as_echo "$as_me: failed program was:" >&5
1883sed 's/^/| /' conftest.$ac_ext >&5
1884
1885 ac_retval=$ac_status
1886fi
1887 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001888 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001889 as_fn_set_status $ac_retval
1890
1891} # ac_fn_c_try_run
1892
1893# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1894# -------------------------------------------------------
1895# Tests whether HEADER exists and can be compiled using the include files in
1896# INCLUDES, setting the cache variable VAR accordingly.
1897ac_fn_c_check_header_compile ()
1898{
1899 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1901$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001902if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001903 $as_echo_n "(cached) " >&6
1904else
1905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1906/* end confdefs.h. */
1907$4
1908#include <$2>
1909_ACEOF
1910if ac_fn_c_try_compile "$LINENO"; then :
1911 eval "$3=yes"
1912else
1913 eval "$3=no"
1914fi
1915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1916fi
1917eval ac_res=\$$3
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1919$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001920 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001921
1922} # ac_fn_c_check_header_compile
1923
Matthias Kloseb9621712010-04-24 17:59:49 +00001924# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1925# -------------------------------------------
1926# Tests whether TYPE exists after having included INCLUDES, setting cache
1927# variable VAR accordingly.
1928ac_fn_c_check_type ()
1929{
1930 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1932$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001933if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001934 $as_echo_n "(cached) " >&6
1935else
1936 eval "$3=no"
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$4
1940int
1941main ()
1942{
1943if (sizeof ($2))
1944 return 0;
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$4
1953int
1954main ()
1955{
1956if (sizeof (($2)))
1957 return 0;
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963
1964else
1965 eval "$3=yes"
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971eval ac_res=\$$3
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001974 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001975
1976} # ac_fn_c_check_type
1977
1978# ac_fn_c_find_uintX_t LINENO BITS VAR
1979# ------------------------------------
1980# Finds an unsigned integer type with width BITS, setting cache variable VAR
1981# accordingly.
1982ac_fn_c_find_uintX_t ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1986$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001987if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001988 $as_echo_n "(cached) " >&6
1989else
1990 eval "$3=no"
1991 # Order is important - never check a type that is potentially smaller
1992 # than half of the expected target width.
1993 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1994 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996/* end confdefs.h. */
1997$ac_includes_default
1998int
1999main ()
2000{
2001static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002002test_array [0] = 0;
2003return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002004
2005 ;
2006 return 0;
2007}
2008_ACEOF
2009if ac_fn_c_try_compile "$LINENO"; then :
2010 case $ac_type in #(
2011 uint$2_t) :
2012 eval "$3=yes" ;; #(
2013 *) :
2014 eval "$3=\$ac_type" ;;
2015esac
2016fi
2017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002018 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002019
2020else
2021 break
2022fi
2023 done
2024fi
2025eval ac_res=\$$3
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2027$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002028 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002029
2030} # ac_fn_c_find_uintX_t
2031
2032# ac_fn_c_find_intX_t LINENO BITS VAR
2033# -----------------------------------
2034# Finds a signed integer type with width BITS, setting cache variable VAR
2035# accordingly.
2036ac_fn_c_find_intX_t ()
2037{
2038 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2040$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002041if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002042 $as_echo_n "(cached) " >&6
2043else
2044 eval "$3=no"
2045 # Order is important - never check a type that is potentially smaller
2046 # than half of the expected target width.
2047 for ac_type in int$2_t 'int' 'long int' \
2048 'long long int' 'short int' 'signed char'; do
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002052 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002053int
2054main ()
2055{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002056static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002057test_array [0] = 0;
2058return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066/* end confdefs.h. */
2067$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002068 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002069int
2070main ()
2071{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002072static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002073 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002074test_array [0] = 0;
2075return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081if ac_fn_c_try_compile "$LINENO"; then :
2082
2083else
2084 case $ac_type in #(
2085 int$2_t) :
2086 eval "$3=yes" ;; #(
2087 *) :
2088 eval "$3=\$ac_type" ;;
2089esac
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002094 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002095
2096else
2097 break
2098fi
2099 done
2100fi
2101eval ac_res=\$$3
2102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2103$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002104 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002105
2106} # ac_fn_c_find_intX_t
2107
2108# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2109# --------------------------------------------
2110# Tries to find the compile-time value of EXPR in a program that includes
2111# INCLUDES, setting VAR accordingly. Returns whether the value could be
2112# computed
2113ac_fn_c_compute_int ()
2114{
2115 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2116 if test "$cross_compiling" = yes; then
2117 # Depending upon the size, compute the lo and hi bounds.
2118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002125test_array [0] = 0;
2126return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_lo=0 ac_mid=0
2134 while :; do
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002142test_array [0] = 0;
2143return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_hi=$ac_mid; break
2151else
2152 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2153 if test $ac_lo -le $ac_mid; then
2154 ac_lo= ac_hi=
2155 break
2156 fi
2157 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160 done
2161else
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165int
2166main ()
2167{
2168static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002169test_array [0] = 0;
2170return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002171
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_compile "$LINENO"; then :
2177 ac_hi=-1 ac_mid=-1
2178 while :; do
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181$4
2182int
2183main ()
2184{
2185static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002186test_array [0] = 0;
2187return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002188
2189 ;
2190 return 0;
2191}
2192_ACEOF
2193if ac_fn_c_try_compile "$LINENO"; then :
2194 ac_lo=$ac_mid; break
2195else
2196 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2197 if test $ac_mid -le $ac_hi; then
2198 ac_lo= ac_hi=
2199 break
2200 fi
2201 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2202fi
2203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2204 done
2205else
2206 ac_lo= ac_hi=
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209fi
2210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2211# Binary search between lo and hi bounds.
2212while test "x$ac_lo" != "x$ac_hi"; do
2213 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216$4
2217int
2218main ()
2219{
2220static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002221test_array [0] = 0;
2222return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002223
2224 ;
2225 return 0;
2226}
2227_ACEOF
2228if ac_fn_c_try_compile "$LINENO"; then :
2229 ac_hi=$ac_mid
2230else
2231 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2232fi
2233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2234done
2235case $ac_lo in #((
2236?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2237'') ac_retval=1 ;;
2238esac
2239 else
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$4
2243static long int longval () { return $2; }
2244static unsigned long int ulongval () { return $2; }
2245#include <stdio.h>
2246#include <stdlib.h>
2247int
2248main ()
2249{
2250
2251 FILE *f = fopen ("conftest.val", "w");
2252 if (! f)
2253 return 1;
2254 if (($2) < 0)
2255 {
2256 long int i = longval ();
2257 if (i != ($2))
2258 return 1;
2259 fprintf (f, "%ld", i);
2260 }
2261 else
2262 {
2263 unsigned long int i = ulongval ();
2264 if (i != ($2))
2265 return 1;
2266 fprintf (f, "%lu", i);
2267 }
2268 /* Do not output a trailing newline, as this causes \r\n confusion
2269 on some platforms. */
2270 return ferror (f) || fclose (f) != 0;
2271
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_run "$LINENO"; then :
2277 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2278else
2279 ac_retval=1
2280fi
2281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2282 conftest.$ac_objext conftest.beam conftest.$ac_ext
2283rm -f conftest.val
2284
2285 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002286 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002287 as_fn_set_status $ac_retval
2288
2289} # ac_fn_c_compute_int
2290
2291# ac_fn_c_check_func LINENO FUNC VAR
2292# ----------------------------------
2293# Tests whether FUNC exists, setting the cache variable VAR accordingly
2294ac_fn_c_check_func ()
2295{
2296 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2298$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002299if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002300 $as_echo_n "(cached) " >&6
2301else
2302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303/* end confdefs.h. */
2304/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2305 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2306#define $2 innocuous_$2
2307
2308/* System header to define __stub macros and hopefully few prototypes,
2309 which can conflict with char $2 (); below.
2310 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2311 <limits.h> exists even on freestanding compilers. */
2312
2313#ifdef __STDC__
2314# include <limits.h>
2315#else
2316# include <assert.h>
2317#endif
2318
2319#undef $2
2320
2321/* Override any GCC internal prototype to avoid an error.
2322 Use char because int might match the return type of a GCC
2323 builtin and then its argument prototype would still apply. */
2324#ifdef __cplusplus
2325extern "C"
2326#endif
2327char $2 ();
2328/* The GNU C library defines this for functions which it implements
2329 to always fail with ENOSYS. Some functions are actually named
2330 something starting with __ and the normal name is an alias. */
2331#if defined __stub_$2 || defined __stub___$2
2332choke me
2333#endif
2334
2335int
2336main ()
2337{
2338return $2 ();
2339 ;
2340 return 0;
2341}
2342_ACEOF
2343if ac_fn_c_try_link "$LINENO"; then :
2344 eval "$3=yes"
2345else
2346 eval "$3=no"
2347fi
2348rm -f core conftest.err conftest.$ac_objext \
2349 conftest$ac_exeext conftest.$ac_ext
2350fi
2351eval ac_res=\$$3
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2353$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002354 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002355
2356} # ac_fn_c_check_func
2357
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002358# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2359# ---------------------------------------------
2360# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2361# accordingly.
2362ac_fn_c_check_decl ()
2363{
2364 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2365 as_decl_name=`echo $2|sed 's/ *(.*//'`
2366 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2368$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2369if eval \${$3+:} false; then :
2370 $as_echo_n "(cached) " >&6
2371else
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h. */
2374$4
2375int
2376main ()
2377{
2378#ifndef $as_decl_name
2379#ifdef __cplusplus
2380 (void) $as_decl_use;
2381#else
2382 (void) $as_decl_name;
2383#endif
2384#endif
2385
2386 ;
2387 return 0;
2388}
2389_ACEOF
2390if ac_fn_c_try_compile "$LINENO"; then :
2391 eval "$3=yes"
2392else
2393 eval "$3=no"
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396fi
2397eval ac_res=\$$3
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399$as_echo "$ac_res" >&6; }
2400 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2401
2402} # ac_fn_c_check_decl
2403
Matthias Kloseb9621712010-04-24 17:59:49 +00002404# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2405# ----------------------------------------------------
2406# Tries to find if the field MEMBER exists in type AGGR, after including
2407# INCLUDES, setting cache variable VAR accordingly.
2408ac_fn_c_check_member ()
2409{
2410 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2412$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002413if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 $as_echo_n "(cached) " >&6
2415else
2416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417/* end confdefs.h. */
2418$5
2419int
2420main ()
2421{
2422static $2 ac_aggr;
2423if (ac_aggr.$3)
2424return 0;
2425 ;
2426 return 0;
2427}
2428_ACEOF
2429if ac_fn_c_try_compile "$LINENO"; then :
2430 eval "$4=yes"
2431else
2432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2433/* end confdefs.h. */
2434$5
2435int
2436main ()
2437{
2438static $2 ac_aggr;
2439if (sizeof ac_aggr.$3)
2440return 0;
2441 ;
2442 return 0;
2443}
2444_ACEOF
2445if ac_fn_c_try_compile "$LINENO"; then :
2446 eval "$4=yes"
2447else
2448 eval "$4=no"
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451fi
2452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453fi
2454eval ac_res=\$$4
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002457 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002458
2459} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002461This file contains any messages produced by compilers while
2462running configure, to aid debugging if configure makes a mistake.
2463
Yury Selivanov7aa53412015-05-30 10:57:56 -04002464It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002465generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467 $ $0 $@
2468
2469_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002471{
2472cat <<_ASUNAME
2473## --------- ##
2474## Platform. ##
2475## --------- ##
2476
2477hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2478uname -m = `(uname -m) 2>/dev/null || echo unknown`
2479uname -r = `(uname -r) 2>/dev/null || echo unknown`
2480uname -s = `(uname -s) 2>/dev/null || echo unknown`
2481uname -v = `(uname -v) 2>/dev/null || echo unknown`
2482
2483/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2484/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2485
2486/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2487/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2488/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002490/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2491/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2492/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2493
2494_ASUNAME
2495
2496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2497for as_dir in $PATH
2498do
2499 IFS=$as_save_IFS
2500 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "PATH: $as_dir"
2502 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002504
2505} >&5
2506
2507cat >&5 <<_ACEOF
2508
2509
2510## ----------- ##
2511## Core tests. ##
2512## ----------- ##
2513
2514_ACEOF
2515
2516
2517# Keep a trace of the command line.
2518# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002519# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002520# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002521# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002522ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002523ac_configure_args0=
2524ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002525ac_must_keep_next=false
2526for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002527do
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 for ac_arg
2529 do
2530 case $ac_arg in
2531 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2532 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2533 | -silent | --silent | --silen | --sile | --sil)
2534 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 esac
2538 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002543 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002545 case $ac_arg in
2546 *=* | --config-cache | -C | -disable-* | --disable-* \
2547 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2548 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2549 | -with-* | --with-* | -without-* | --without-* | --x)
2550 case "$ac_configure_args0 " in
2551 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2552 esac
2553 ;;
2554 -* ) ac_must_keep_next=true ;;
2555 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002556 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 ;;
2559 esac
2560 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002561done
Matthias Kloseb9621712010-04-24 17:59:49 +00002562{ ac_configure_args0=; unset ac_configure_args0;}
2563{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002564
2565# When interrupted or exit'd, cleanup temporary files, and complete
2566# config.log. We remove comments because anyway the quotes in there
2567# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568# WARNING: Use '\'' to represent an apostrophe within the trap.
2569# 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 +00002570trap 'exit_status=$?
2571 # Save into config.log some information that might help in debugging.
2572 {
2573 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002574
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002576## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002577## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 echo
2579 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580(
2581 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2582 eval ac_val=\$$ac_var
2583 case $ac_val in #(
2584 *${as_nl}*)
2585 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2587$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 esac
2589 case $ac_var in #(
2590 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2592 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 esac ;;
2594 esac
2595 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2598 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 "s/'\''/'\''\\\\'\'''\''/g;
2601 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2602 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002603 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002605 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 esac |
2607 sort
2608)
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002610
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002611 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002612## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002613## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002614 echo
2615 for ac_var in $ac_subst_vars
2616 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 eval ac_val=\$$ac_var
2618 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002622 done | sort
2623 echo
2624
2625 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002626 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002628## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002629 echo
2630 for ac_var in $ac_subst_files
2631 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632 eval ac_val=\$$ac_var
2633 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002637 done | sort
2638 echo
2639 fi
2640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002642 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002643## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002644## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 echo
2648 fi
2649 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 $as_echo "$as_me: caught signal $ac_signal"
2651 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653 rm -f core *.core core.conftest.* &&
2654 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002657for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002659done
2660ac_signal=0
2661
2662# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002664
Matthias Kloseb9621712010-04-24 17:59:49 +00002665$as_echo "/* confdefs.h */" > confdefs.h
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667# Predefined preprocessor variables.
2668
2669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_NAME "$PACKAGE_NAME"
2671_ACEOF
2672
Martin v. Löwis11437992002-04-12 09:54:03 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2675_ACEOF
2676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_VERSION "$PACKAGE_VERSION"
2679_ACEOF
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681cat >>confdefs.h <<_ACEOF
2682#define PACKAGE_STRING "$PACKAGE_STRING"
2683_ACEOF
2684
Martin v. Löwis11437992002-04-12 09:54:03 +00002685cat >>confdefs.h <<_ACEOF
2686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2687_ACEOF
2688
Matthias Kloseb9621712010-04-24 17:59:49 +00002689cat >>confdefs.h <<_ACEOF
2690#define PACKAGE_URL "$PACKAGE_URL"
2691_ACEOF
2692
Martin v. Löwis11437992002-04-12 09:54:03 +00002693
2694# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002695# Prefer an explicitly selected file to automatically selected ones.
2696ac_site_file1=NONE
2697ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002699 # We do not want a PATH search for config.site.
2700 case $CONFIG_SITE in #((
2701 -*) ac_site_file1=./$CONFIG_SITE;;
2702 */*) ac_site_file1=$CONFIG_SITE;;
2703 *) ac_site_file1=./$CONFIG_SITE;;
2704 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 ac_site_file1=$prefix/share/config.site
2707 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002708else
Matthias Kloseb9621712010-04-24 17:59:49 +00002709 ac_site_file1=$ac_default_prefix/share/config.site
2710 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002712for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002713do
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 test "x$ac_site_file" = xNONE && continue
2715 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2717$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002719 . "$ac_site_file" \
2720 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2722as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002723See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724 fi
2725done
2726
2727if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002728 # Some versions of bash will fail to source /dev/null (special files
2729 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2730 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2732$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2735 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 esac
2737 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002738else
Matthias Kloseb9621712010-04-24 17:59:49 +00002739 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2740$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 >$cache_file
2742fi
2743
2744# Check that the precious variables saved in the cache have kept the same
2745# value.
2746ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002747for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2749 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002750 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2751 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 case $ac_old_set,$ac_new_set in
2753 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2755$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 +00002756 ac_cache_corrupted=: ;;
2757 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002758 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2759$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 ac_cache_corrupted=: ;;
2761 ,);;
2762 *)
2763 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002764 # differences in whitespace do not lead to failure.
2765 ac_old_val_w=`echo x $ac_old_val`
2766 ac_new_val_w=`echo x $ac_new_val`
2767 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2769$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2770 ac_cache_corrupted=:
2771 else
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2773$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2774 eval $ac_var=\$ac_old_val
2775 fi
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2777$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2779$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 fi;;
2781 esac
2782 # Pass precious variables to config.status.
2783 if test "$ac_new_set" = set; then
2784 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002785 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002786 *) ac_arg=$ac_var=$ac_new_val ;;
2787 esac
2788 case " $ac_configure_args " in
2789 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002790 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 esac
2792 fi
2793done
2794if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002795 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2798$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002799 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002801## -------------------- ##
2802## Main body of script. ##
2803## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002804
Guido van Rossum7f43da71994-08-01 12:15:30 +00002805ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002807ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2808ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2809ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002810
Guido van Rossum627b2d71993-12-24 10:39:16 +00002811
Michael W. Hudson54241132001-12-07 15:38:26 +00002812
Trent Nelson4d4ec652012-10-16 08:51:24 -04002813
Trent Nelson5595ab52012-10-17 04:47:31 -04002814if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002815 # If we're building out-of-tree, we need to make sure the following
2816 # resources get picked up before their $srcdir counterparts.
2817 # Objects/ -> typeslots.inc
2818 # Include/ -> Python-ast.h, graminit.h
2819 # Python/ -> importlib.h
2820 # (A side effect of this is that these resources will automatically be
2821 # regenerated when building out-of-tree, regardless of whether or not
2822 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2823 # off.)
2824 BASECPPFLAGS="-IObjects -IInclude -IPython"
2825else
2826 BASECPPFLAGS=""
2827fi
2828
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002829
2830
2831
2832
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002833if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002834then
2835# Extract the first word of "hg", so it can be a program name with args.
2836set dummy hg; ac_word=$2
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2838$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002839if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002840 $as_echo_n "(cached) " >&6
2841else
2842 if test -n "$HAS_HG"; then
2843 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2844else
2845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2846for as_dir in $PATH
2847do
2848 IFS=$as_save_IFS
2849 test -z "$as_dir" && as_dir=.
2850 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002852 ac_cv_prog_HAS_HG="found"
2853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2854 break 2
2855 fi
2856done
2857 done
2858IFS=$as_save_IFS
2859
2860 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2861fi
2862fi
2863HAS_HG=$ac_cv_prog_HAS_HG
2864if test -n "$HAS_HG"; then
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2866$as_echo "$HAS_HG" >&6; }
2867else
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2869$as_echo "no" >&6; }
2870fi
2871
2872
2873else
2874HAS_HG=no-repository
2875fi
2876if test $HAS_HG = found
2877then
2878 HGVERSION="hg id -i \$(srcdir)"
2879 HGTAG="hg id -t \$(srcdir)"
2880 HGBRANCH="hg id -b \$(srcdir)"
2881else
2882 HGVERSION=""
2883 HGTAG=""
2884 HGBRANCH=""
2885fi
2886
2887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002888ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002889
2890
Victor Stinnerdddf4842016-06-07 11:21:42 +02002891
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002892ac_aux_dir=
2893for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2894 if test -f "$ac_dir/install-sh"; then
2895 ac_aux_dir=$ac_dir
2896 ac_install_sh="$ac_aux_dir/install-sh -c"
2897 break
2898 elif test -f "$ac_dir/install.sh"; then
2899 ac_aux_dir=$ac_dir
2900 ac_install_sh="$ac_aux_dir/install.sh -c"
2901 break
2902 elif test -f "$ac_dir/shtool"; then
2903 ac_aux_dir=$ac_dir
2904 ac_install_sh="$ac_aux_dir/shtool install -c"
2905 break
2906 fi
2907done
2908if test -z "$ac_aux_dir"; then
2909 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2910fi
2911
2912# These three variables are undocumented and unsupported,
2913# and are intended to be withdrawn in a future Autoconf release.
2914# They can cause serious problems if a builder's source tree is in a directory
2915# whose full name contains unusual characters.
2916ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2917ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2918ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2919
2920
2921# Make sure we can run config.sub.
2922$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2923 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2924
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2926$as_echo_n "checking build system type... " >&6; }
2927if ${ac_cv_build+:} false; then :
2928 $as_echo_n "(cached) " >&6
2929else
2930 ac_build_alias=$build_alias
2931test "x$ac_build_alias" = x &&
2932 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2933test "x$ac_build_alias" = x &&
2934 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2935ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2936 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2937
2938fi
2939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2940$as_echo "$ac_cv_build" >&6; }
2941case $ac_cv_build in
2942*-*-*) ;;
2943*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2944esac
2945build=$ac_cv_build
2946ac_save_IFS=$IFS; IFS='-'
2947set x $ac_cv_build
2948shift
2949build_cpu=$1
2950build_vendor=$2
2951shift; shift
2952# Remember, the first character of IFS is used to create $*,
2953# except with old shells:
2954build_os=$*
2955IFS=$ac_save_IFS
2956case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2957
2958
2959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2960$as_echo_n "checking host system type... " >&6; }
2961if ${ac_cv_host+:} false; then :
2962 $as_echo_n "(cached) " >&6
2963else
2964 if test "x$host_alias" = x; then
2965 ac_cv_host=$ac_cv_build
2966else
2967 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2968 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2969fi
2970
2971fi
2972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2973$as_echo "$ac_cv_host" >&6; }
2974case $ac_cv_host in
2975*-*-*) ;;
2976*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2977esac
2978host=$ac_cv_host
2979ac_save_IFS=$IFS; IFS='-'
2980set x $ac_cv_host
2981shift
2982host_cpu=$1
2983host_vendor=$2
2984shift; shift
2985# Remember, the first character of IFS is used to create $*,
2986# except with old shells:
2987host_os=$*
2988IFS=$ac_save_IFS
2989case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2990
2991
2992
doko@python.orga10e4a92013-01-25 18:45:12 +01002993
2994
Ned Deilyfcbc2462014-08-22 13:32:49 -07002995# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2996rm -f pybuilddir.txt
2997
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002998if test "$cross_compiling" = yes; then
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3000$as_echo_n "checking for python interpreter for cross build... " >&6; }
3001 if test -z "$PYTHON_FOR_BUILD"; then
3002 for interp in python$PACKAGE_VERSION python3 python; do
3003 which $interp >/dev/null 2>&1 || continue
3004 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3005 break
3006 fi
3007 interp=
3008 done
3009 if test x$interp = x; then
3010 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3011 fi
3012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3013$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003014 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 +02003015 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003016elif test "$cross_compiling" = maybe; then
3017 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003018else
3019 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3020fi
3021
3022
Martin v. Löwis11437992002-04-12 09:54:03 +00003023
Benjamin Petersond23f8222009-04-05 19:13:16 +00003024if test "$prefix" != "/"; then
3025 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3026fi
3027
3028
Martin v. Löwis11437992002-04-12 09:54:03 +00003029
3030
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003031# We don't use PACKAGE_ variables, and they cause conflicts
3032# with other autoconf-based packages that include Python.h
3033grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3034rm confdefs.h
3035mv confdefs.h.new confdefs.h
3036
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003037
Yury Selivanov7aa53412015-05-30 10:57:56 -04003038VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003039
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003040# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003041
3042SOVERSION=1.0
3043
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003044# The later defininition of _XOPEN_SOURCE disables certain features
3045# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3046
Matthias Kloseb9621712010-04-24 17:59:49 +00003047$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003048
3049
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003050# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3051# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3052# them.
3053
Matthias Kloseb9621712010-04-24 17:59:49 +00003054$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003055
3056
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003057# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3058# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3059# them.
3060
Matthias Kloseb9621712010-04-24 17:59:49 +00003061$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003062
3063
Martin v. Löwisd6320502004-08-12 13:45:08 +00003064# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3065# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3066
Matthias Kloseb9621712010-04-24 17:59:49 +00003067$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003068
3069
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3071# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3072# them.
3073
Matthias Kloseb9621712010-04-24 17:59:49 +00003074$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075
3076
3077
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003078define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003079
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003080# Arguments passed to configure.
3081
3082CONFIG_ARGS="$ac_configure_args"
3083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3085$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003086# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003087if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003088 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089 case $enableval in
3090 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003091 # Locate the best usable SDK, see Mac/README.txt for more
3092 # information
3093 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003094 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003095 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003096 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3097 if test ! -d "${enableval}"
3098 then
3099 enableval=/
3100 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003101 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003102 ;;
3103 esac
3104 case $enableval in
3105 no)
3106 UNIVERSALSDK=
3107 enable_universalsdk=
3108 ;;
3109 *)
3110 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003111 if test ! -d "${UNIVERSALSDK}"
3112 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003113 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003114 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003115 ;;
3116 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003117
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003118
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119else
3120
3121 UNIVERSALSDK=
3122 enable_universalsdk=
3123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003126if test -n "${UNIVERSALSDK}"
3127then
Matthias Kloseb9621712010-04-24 17:59:49 +00003128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3129$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003130else
Matthias Kloseb9621712010-04-24 17:59:49 +00003131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3132$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003133fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003136
Ned Deily87adb6e2013-10-18 21:09:56 -07003137ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003138
Ned Deilycbfb9a52012-06-23 16:02:19 -07003139# For backward compatibility reasons we prefer to select '32-bit' if available,
3140# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003141UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003142if test "`uname -s`" = "Darwin"
3143then
3144 if test -n "${UNIVERSALSDK}"
3145 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003146 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003147 then
3148 UNIVERSAL_ARCHS="intel"
3149 fi
3150 fi
3151fi
3152
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003153
Matthias Kloseb9621712010-04-24 17:59:49 +00003154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3155$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
3157# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003158if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003159 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003160 UNIVERSAL_ARCHS="$withval"
3161
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003162fi
3163
Ned Deily87adb6e2013-10-18 21:09:56 -07003164if test -n "${UNIVERSALSDK}"
3165then
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3167$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3168else
3169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3170$as_echo "no" >&6; }
3171fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003172
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003173
3174# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003175if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003176 withval=$with_framework_name;
3177 PYTHONFRAMEWORK=${withval}
3178 PYTHONFRAMEWORKDIR=${withval}.framework
3179 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3180
3181else
3182
3183 PYTHONFRAMEWORK=Python
3184 PYTHONFRAMEWORKDIR=Python.framework
3185 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3186
3187fi
3188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003190if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003192 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003193 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003194 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003195 esac
3196 case $enableval in
3197 no)
3198 PYTHONFRAMEWORK=
3199 PYTHONFRAMEWORKDIR=no-framework
3200 PYTHONFRAMEWORKPREFIX=
3201 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202 FRAMEWORKINSTALLFIRST=
3203 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 FRAMEWORKALTINSTALLFIRST=
3205 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003206 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003207 if test "x${prefix}" = "xNONE"; then
3208 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3209 else
3210 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3211 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003212 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003213 ;;
3214 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003215 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003216 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003218 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003219 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3220 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003221 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003222 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003223
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003224 if test "x${prefix}" = "xNONE" ; then
3225 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003226
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003227 else
3228 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3229 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003230
3231 case "${enableval}" in
3232 /System*)
3233 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3234 if test "${prefix}" = "NONE" ; then
3235 # See below
3236 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3237 fi
3238 ;;
3239
3240 /Library*)
3241 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3242 ;;
3243
3244 */Library/Frameworks)
3245 MDIR="`dirname "${enableval}"`"
3246 MDIR="`dirname "${MDIR}"`"
3247 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3248
3249 if test "${prefix}" = "NONE"; then
3250 # User hasn't specified the
3251 # --prefix option, but wants to install
3252 # the framework in a non-default location,
3253 # ensure that the compatibility links get
3254 # installed relative to that prefix as well
3255 # instead of in /usr/local.
3256 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3257 fi
3258 ;;
3259
3260 *)
3261 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3262 ;;
3263 esac
3264
Jack Jansen127e56e2001-09-11 14:41:54 +00003265 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003266
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003267 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003268 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003269 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003272
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003273 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3274
3275 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3276
Jack Jansene578a632001-08-15 01:27:14 +00003277 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003278
Guido van Rossum563e7081996-09-10 18:20:48 +00003279else
Martin v. Löwis11437992002-04-12 09:54:03 +00003280
Jack Jansene578a632001-08-15 01:27:14 +00003281 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003282 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003283 PYTHONFRAMEWORKPREFIX=
3284 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003285 FRAMEWORKINSTALLFIRST=
3286 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003287 FRAMEWORKALTINSTALLFIRST=
3288 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003289 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003290 if test "x${prefix}" = "xNONE" ; then
3291 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3292 else
3293 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3294 fi
Jack Jansene578a632001-08-15 01:27:14 +00003295 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003296
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003298fi
3299
Thomas Wouters477c8d52006-05-27 19:21:47 +00003300
3301
Michael W. Hudson54241132001-12-07 15:38:26 +00003302
3303
3304
3305
Jack Jansene578a632001-08-15 01:27:14 +00003306
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003307
3308
3309
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003310
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003311
Ned Deilyb8f944f2013-11-21 22:42:25 -08003312
Jack Jansene578a632001-08-15 01:27:14 +00003313##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003314## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003315## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003316##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003317# Set name for machine-dependent library files
3318
Matthias Kloseb9621712010-04-24 17:59:49 +00003319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3320$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003321if test -z "$MACHDEP"
3322then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003323 # avoid using uname for cross builds
3324 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003325 # ac_sys_system and ac_sys_release are used for setting
3326 # a lot of different things including 'define_xopen_source'
3327 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003328 case "$host" in
3329 *-*-linux*)
3330 ac_sys_system=Linux
3331 ;;
3332 *-*-cygwin*)
3333 ac_sys_system=Cygwin
3334 ;;
3335 *)
3336 # for now, limit cross builds to known configurations
3337 MACHDEP="unknown"
3338 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3339 esac
3340 ac_sys_release=
3341 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003342 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003343 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003344 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003345 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003346 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003347 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003349 fi
3350 ac_md_system=`echo $ac_sys_system |
3351 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3352 ac_md_release=`echo $ac_sys_release |
3353 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3354 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003355
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003356 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003357 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003358 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003359 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003360 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003361 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003362 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003363fi
Guido van Rossum91922671997-10-09 20:24:13 +00003364
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003365
3366if test "$cross_compiling" = yes; then
3367 case "$host" in
3368 *-*-linux*)
3369 case "$host_cpu" in
3370 arm*)
3371 _host_cpu=arm
3372 ;;
3373 *)
3374 _host_cpu=$host_cpu
3375 esac
3376 ;;
3377 *-*-cygwin*)
3378 _host_cpu=
3379 ;;
3380 *)
3381 # for now, limit cross builds to known configurations
3382 MACHDEP="unknown"
3383 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3384 esac
3385 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3386fi
3387
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003388# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3389# disable features if it is defined, without any means to access these
3390# features as extensions. For these systems, we skip the definition of
3391# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3392# some feature, make sure there is no alternative way to access this
3393# feature. Also, when using wildcards, make sure you have verified the
3394# need for not defining _XOPEN_SOURCE on all systems matching the
3395# wildcard, and that the wildcard does not include future systems
3396# (which may remove their limitations).
3397case $ac_sys_system/$ac_sys_release in
3398 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3399 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003400 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003401 # In addition, Stefan Krah confirms that issue #1244610 exists through
3402 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003403 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003404 define_xopen_source=no
3405 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3406 # also defined. This can be overridden by defining _BSD_SOURCE
3407 # As this has a different meaning on Linux, only define it on OpenBSD
3408
Matthias Kloseb9621712010-04-24 17:59:49 +00003409$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003410
3411 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003412 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003413 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3414 # also defined. This can be overridden by defining _BSD_SOURCE
3415 # As this has a different meaning on Linux, only define it on OpenBSD
3416
Matthias Kloseb9621712010-04-24 17:59:49 +00003417$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003418
3419 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003420 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3421 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3422 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003423 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 +00003424 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003425 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3426 # request to enable features supported by the standard as a request
3427 # to disable features not supported by the standard. The best way
3428 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3429 # entirely and define __EXTENSIONS__ instead.
3430 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003431 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003432 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3433 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003434 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003435 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003436 define_xopen_source=no;;
3437 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003438 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003439 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003440 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003441 # On FreeBSD 4, the math functions C89 does not cover are never defined
3442 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3443 FreeBSD/4.*)
3444 define_xopen_source=no;;
3445 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3446 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3447 # identifies itself as Darwin/7.*
3448 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3449 # disables platform specific features beyond repair.
3450 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3451 # has no effect, don't bother defining them
3452 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003453 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003454 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003455 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003456 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3457 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3458 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003459 AIX/4)
3460 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003461 AIX/5)
3462 if test `uname -r` -eq 1; then
3463 define_xopen_source=no
3464 fi
3465 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003466 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3467 # defining NI_NUMERICHOST.
3468 QNX/6.3.2)
3469 define_xopen_source=no
3470 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003471
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003472esac
3473
3474if test $define_xopen_source = yes
3475then
Victor Stinner14d098d2011-09-07 22:29:43 +02003476 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003477
Victor Stinner14d098d2011-09-07 22:29:43 +02003478$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003479
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003480
3481 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3482 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3483 # several APIs are not declared. Since this is also needed in some
3484 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003485
Matthias Kloseb9621712010-04-24 17:59:49 +00003486$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003487
3488
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003489
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003490$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003491
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003492fi
3493
Christian Heimes647cd872013-12-07 23:39:33 +01003494# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3495case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003496 hp*|HP*)
3497 define_stdc_a1=yes;;
3498 *)
3499 define_stdc_a1=no;;
3500esac
3501
3502if test $define_stdc_a1 = yes
3503then
Christian Heimes647cd872013-12-07 23:39:33 +01003504
3505$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3506
Christian Heimesb02bcae2013-12-08 15:21:08 +01003507fi
Christian Heimes647cd872013-12-07 23:39:33 +01003508
Guido van Rossum91922671997-10-09 20:24:13 +00003509#
3510# SGI compilers allow the specification of the both the ABI and the
3511# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003512# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003513#
3514# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3515# thus supply support for various ABI/ISA combinations. The MACHDEP
3516# variable is also adjusted.
3517#
3518
3519if test ! -z "$SGI_ABI"
3520then
3521 CC="cc $SGI_ABI"
3522 LDFLAGS="$SGI_ABI $LDFLAGS"
3523 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3526$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003527
Jack Jansen6b08a402004-06-03 12:41:45 +00003528# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3529# it may influence the way we can build extensions, so distutils
3530# needs to check it
3531
Thomas Wouters477c8d52006-05-27 19:21:47 +00003532
Jack Jansen6b08a402004-06-03 12:41:45 +00003533CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003534EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003535
Guido van Rossum627b2d71993-12-24 10:39:16 +00003536# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003537
3538# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3539# for debug/optimization stuff. BASECFLAGS is for flags that are required
3540# just to get things to compile and link. Users are free to override OPT
3541# when running configure or make. The build should not break if they do.
3542# BASECFLAGS should generally not be messed with, however.
3543
3544# XXX shouldn't some/most/all of this code be merged with the stuff later
3545# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3547$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003550if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003552 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003553 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003554 without_gcc=yes;;
3555 yes) CC=gcc
3556 without_gcc=no;;
3557 *) CC=$withval
3558 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003559 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003560else
Martin v. Löwis11437992002-04-12 09:54:03 +00003561
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003562 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003563 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003564 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003565 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003566 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003567fi
3568
Matthias Kloseb9621712010-04-24 17:59:49 +00003569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3570$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003571
Zachary Ware5af85642015-12-21 12:09:17 -06003572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3573$as_echo_n "checking for --with-icc... " >&6; }
3574
3575# Check whether --with-icc was given.
3576if test "${with_icc+set}" = set; then :
3577 withval=$with_icc;
3578 case $withval in
3579 no) CC=${CC:-cc}
3580 with_icc=no;;
3581 yes) CC=icc
3582 CXX=icpc
3583 with_icc=yes;;
3584 *) CC=$withval
3585 with_icc=$withval;;
3586 esac
3587else
3588
3589 with_icc=no
3590fi
3591
3592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3593$as_echo "$with_icc" >&6; }
3594
Guido van Rossum8b131c51995-03-09 14:10:13 +00003595# If the user switches compilers, we can't believe the cache
3596if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3597then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003598 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003599(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003600fi
3601
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003602# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3603# when the compiler supports them, but we don't always want -O2, and
3604# we set -g later.
3605if test -z "$CFLAGS"; then
3606 CFLAGS=
3607fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003608
3609if test "$ac_sys_system" = "Darwin"
3610then
3611 # Compiler selection on MacOSX is more complicated than
3612 # AC_PROG_CC can handle, see Mac/README.txt for more
3613 # information
3614 if test -z "${CC}"
3615 then
3616 found_gcc=
3617 found_clang=
3618 as_save_IFS=$IFS; IFS=:
3619 for as_dir in $PATH
3620 do
3621 IFS=$as_save_IFS
3622 if test -x $as_dir/gcc; then
3623 if test -z "${found_gcc}"; then
3624 found_gcc=$as_dir/gcc
3625 fi
3626 fi
3627 if test -x $as_dir/clang; then
3628 if test -z "${found_clang}"; then
3629 found_clang=$as_dir/clang
3630 fi
3631 fi
3632 done
3633 IFS=$as_save_IFS
3634
3635 if test -n "$found_gcc" -a -n "$found_clang"
3636 then
3637 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3638 then
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3640$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3641 CC="$found_clang"
3642 CXX="$found_clang++"
3643 fi
3644
3645
3646 elif test -z "$found_gcc" -a -n "$found_clang"
3647 then
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3649$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3650 CC="$found_clang"
3651 CXX="$found_clang++"
3652
3653 elif test -z "$found_gcc" -a -z "$found_clang"
3654 then
3655 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3656 if test -n "${found_clang}"
3657 then
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3659$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3660 CC="${found_clang}"
3661 CXX="`/usr/bin/xcrun -find clang++`"
3662
3663 # else: use default behaviour
3664 fi
3665 fi
3666 fi
3667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668ac_ext=c
3669ac_cpp='$CPP $CPPFLAGS'
3670ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3671ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3672ac_compiler_gnu=$ac_cv_c_compiler_gnu
3673if test -n "$ac_tool_prefix"; then
3674 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3675set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3677$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003678if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003680else
3681 if test -n "$CC"; then
3682 ac_cv_prog_CC="$CC" # Let the user override the test.
3683else
Martin v. Löwis11437992002-04-12 09:54:03 +00003684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3685for as_dir in $PATH
3686do
3687 IFS=$as_save_IFS
3688 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 $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 +00003693 break 2
3694 fi
3695done
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003698
Jack Jansendd19cf82001-12-06 22:36:17 +00003699fi
3700fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003701CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003702if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3704$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003705else
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3707$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003708fi
3709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711fi
3712if test -z "$ac_cv_prog_CC"; then
3713 ac_ct_CC=$CC
3714 # Extract the first word of "gcc", so it can be a program name with args.
3715set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003718if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003720else
3721 if test -n "$ac_ct_CC"; then
3722 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3723else
3724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 break 2
3734 fi
3735done
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
3739fi
3740fi
3741ac_ct_CC=$ac_cv_prog_ac_ct_CC
3742if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3744$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003745else
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3747$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003748fi
3749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 if test "x$ac_ct_CC" = x; then
3751 CC=""
3752 else
3753 case $cross_compiling:$ac_tool_warned in
3754yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757ac_tool_warned=yes ;;
3758esac
3759 CC=$ac_ct_CC
3760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003761else
3762 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003763fi
3764
Jack Jansendd19cf82001-12-06 22:36:17 +00003765if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 if test -n "$ac_tool_prefix"; then
3767 # 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 +00003768set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3770$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003771if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003773else
3774 if test -n "$CC"; then
3775 ac_cv_prog_CC="$CC" # Let the user override the test.
3776else
Martin v. Löwis11437992002-04-12 09:54:03 +00003777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3778for as_dir in $PATH
3779do
3780 IFS=$as_save_IFS
3781 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 $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 +00003786 break 2
3787 fi
3788done
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003791
3792fi
3793fi
3794CC=$ac_cv_prog_CC
3795if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3797$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003798else
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3800$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801fi
3802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
3806if test -z "$CC"; then
3807 # Extract the first word of "cc", so it can be a program name with args.
3808set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3810$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003811if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
3814 if test -n "$CC"; then
3815 ac_cv_prog_CC="$CC" # Let the user override the test.
3816else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003817 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3819for as_dir in $PATH
3820do
3821 IFS=$as_save_IFS
3822 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3826 ac_prog_rejected=yes
3827 continue
3828 fi
3829 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 $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 +00003831 break 2
3832 fi
3833done
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003836
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003837if test $ac_prog_rejected = yes; then
3838 # We found a bogon in the path, so make sure we never use it.
3839 set dummy $ac_cv_prog_CC
3840 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003842 # We chose a different compiler from the bogus one.
3843 # However, it has the same basename, so the bogon will be chosen
3844 # first if we set CC to just the basename; use the full file name.
3845 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003846 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003847 fi
3848fi
3849fi
3850fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003851CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003852if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3854$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003855else
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003858fi
3859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861fi
3862if test -z "$CC"; then
3863 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 do
3866 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3867set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3869$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003870if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003872else
3873 if test -n "$CC"; then
3874 ac_cv_prog_CC="$CC" # Let the user override the test.
3875else
Martin v. Löwis11437992002-04-12 09:54:03 +00003876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3877for as_dir in $PATH
3878do
3879 IFS=$as_save_IFS
3880 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 $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 +00003885 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003886 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003887done
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003890
3891fi
3892fi
3893CC=$ac_cv_prog_CC
3894if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3896$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003897else
Matthias Kloseb9621712010-04-24 17:59:49 +00003898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3899$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003900fi
3901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 test -n "$CC" && break
3904 done
3905fi
3906if test -z "$CC"; then
3907 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003909do
3910 # Extract the first word of "$ac_prog", so it can be a program name with args.
3911set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3913$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003914if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003915 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003916else
3917 if test -n "$ac_ct_CC"; then
3918 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3919else
3920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3921for as_dir in $PATH
3922do
3923 IFS=$as_save_IFS
3924 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003927 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 $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 +00003929 break 2
3930 fi
3931done
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003934
Martin v. Löwis11437992002-04-12 09:54:03 +00003935fi
3936fi
3937ac_ct_CC=$ac_cv_prog_ac_ct_CC
3938if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3940$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003941else
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3943$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003944fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 test -n "$ac_ct_CC" && break
3948done
Michael W. Hudson54241132001-12-07 15:38:26 +00003949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 if test "x$ac_ct_CC" = x; then
3951 CC=""
3952 else
3953 case $cross_compiling:$ac_tool_warned in
3954yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957ac_tool_warned=yes ;;
3958esac
3959 CC=$ac_ct_CC
3960 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003961fi
3962
3963fi
3964
3965
Matthias Kloseb9621712010-04-24 17:59:49 +00003966test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003968as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003969See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003970
3971# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003972$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3973set X $ac_compile
3974ac_compiler=$2
3975for ac_option in --version -v -V -qversion; do
3976 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977case "(($ac_try" in
3978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3979 *) ac_try_echo=$ac_try;;
3980esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003981eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3982$as_echo "$ac_try_echo"; } >&5
3983 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003985 if test -s conftest.err; then
3986 sed '10a\
3987... rest of stderr output deleted ...
3988 10q' conftest.err >conftest.er1
3989 cat conftest.er1 >&5
3990 fi
3991 rm -f conftest.er1 conftest.err
3992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3993 test $ac_status = 0; }
3994done
Martin v. Löwis11437992002-04-12 09:54:03 +00003995
Matthias Kloseb9621712010-04-24 17:59:49 +00003996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003997/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003998
Martin v. Löwis11437992002-04-12 09:54:03 +00003999int
4000main ()
4001{
4002
4003 ;
4004 return 0;
4005}
4006_ACEOF
4007ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004008ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004009# Try to create an executable without -o first, disregard a.out.
4010# It will help us diagnose broken compilers, and finding out an intuition
4011# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4013$as_echo_n "checking whether the C compiler works... " >&6; }
4014ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4015
4016# The possible output files:
4017ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019ac_rmfiles=
4020for ac_file in $ac_files
4021do
4022 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4025 esac
4026done
4027rm -f $ac_rmfiles
4028
Matthias Kloseb9621712010-04-24 17:59:49 +00004029if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4035$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004037 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4039 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4041# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4042# in a Makefile. We should not override ac_cv_exeext if it was cached,
4043# so that the user can short-circuit this test for compilers unknown to
4044# Autoconf.
4045for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004046do
4047 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004048 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050 ;;
4051 [ab].out )
4052 # We found the default executable, but exeext='' is most
4053 # certainly right.
4054 break;;
4055 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057 then :; else
4058 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4059 fi
4060 # We set ac_cv_exeext here because the later test for it is not
4061 # safe: cross compilers may not add the suffix if given an `-o'
4062 # argument, so we may need to know it at that point already.
4063 # Even if this section looks crufty: it has the advantage of
4064 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004065 break;;
4066 * )
4067 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 esac
4069done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004070test "$ac_cv_exeext" = no && ac_cv_exeext=
4071
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004072else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073 ac_file=''
4074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004075if test -z "$ac_file"; then :
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4077$as_echo "no" >&6; }
4078$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004079sed 's/^/| /' conftest.$ac_ext >&5
4080
Matthias Kloseb9621712010-04-24 17:59:49 +00004081{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004083as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004084See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004085else
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4087$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4090$as_echo_n "checking for C compiler default output file name... " >&6; }
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4092$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004093ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094
Matthias Kloseb9621712010-04-24 17:59:49 +00004095rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004096ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4098$as_echo_n "checking for suffix of executables... " >&6; }
4099if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004100case "(($ac_try" in
4101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102 *) ac_try_echo=$ac_try;;
4103esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004104eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4105$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004107 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4109 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004110 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4111# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4112# work properly (i.e., refer to `conftest.exe'), while it won't with
4113# `rm'.
4114for ac_file in conftest.exe conftest conftest.*; do
4115 test -f "$ac_file" || continue
4116 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004118 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4119 break;;
4120 * ) break;;
4121 esac
4122done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004123else
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004126as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004127See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004129rm -f conftest conftest$ac_cv_exeext
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4131$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004132
4133rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004134EXEEXT=$ac_cv_exeext
4135ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4137/* end confdefs.h. */
4138#include <stdio.h>
4139int
4140main ()
4141{
4142FILE *f = fopen ("conftest.out", "w");
4143 return ferror (f) || fclose (f) != 0;
4144
4145 ;
4146 return 0;
4147}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004149ac_clean_files="$ac_clean_files conftest.out"
4150# Check that the compiler produces executables we can run. If not, either
4151# the compiler is broken, or we cross compile.
4152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4153$as_echo_n "checking whether we are cross compiling... " >&6; }
4154if test "$cross_compiling" != yes; then
4155 { { ac_try="$ac_link"
4156case "(($ac_try" in
4157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4158 *) ac_try_echo=$ac_try;;
4159esac
4160eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4161$as_echo "$ac_try_echo"; } >&5
4162 (eval "$ac_link") 2>&5
4163 ac_status=$?
4164 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4165 test $ac_status = 0; }
4166 if { ac_try='./conftest$ac_cv_exeext'
4167 { { case "(($ac_try" in
4168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4169 *) ac_try_echo=$ac_try;;
4170esac
4171eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4172$as_echo "$ac_try_echo"; } >&5
4173 (eval "$ac_try") 2>&5
4174 ac_status=$?
4175 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4176 test $ac_status = 0; }; }; then
4177 cross_compiling=no
4178 else
4179 if test "$cross_compiling" = maybe; then
4180 cross_compiling=yes
4181 else
4182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004184as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004185If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004186See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 fi
4188 fi
4189fi
4190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4191$as_echo "$cross_compiling" >&6; }
4192
4193rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4194ac_clean_files=$ac_clean_files_save
4195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4196$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004197if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 $as_echo_n "(cached) " >&6
4199else
4200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004201/* end confdefs.h. */
4202
4203int
4204main ()
4205{
4206
4207 ;
4208 return 0;
4209}
4210_ACEOF
4211rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213case "(($ac_try" in
4214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4215 *) ac_try_echo=$ac_try;;
4216esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004217eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4218$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004220 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4222 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 for ac_file in conftest.o conftest.obj conftest.*; do
4224 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004226 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004227 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4228 break;;
4229 esac
4230done
4231else
Matthias Kloseb9621712010-04-24 17:59:49 +00004232 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004233sed 's/^/| /' conftest.$ac_ext >&5
4234
Matthias Kloseb9621712010-04-24 17:59:49 +00004235{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004237as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004238See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004239fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004240rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4243$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004244OBJEXT=$ac_cv_objext
4245ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4247$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004248if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004250else
Matthias Kloseb9621712010-04-24 17:59:49 +00004251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004252/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004253
Martin v. Löwis11437992002-04-12 09:54:03 +00004254int
4255main ()
4256{
4257#ifndef __GNUC__
4258 choke me
4259#endif
4260
4261 ;
4262 return 0;
4263}
4264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 ac_compiler_gnu=yes
4267else
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004271ac_cv_c_compiler_gnu=$ac_compiler_gnu
4272
4273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4275$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4276if test $ac_compiler_gnu = yes; then
4277 GCC=yes
4278else
4279 GCC=
4280fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004281ac_test_CFLAGS=${CFLAGS+set}
4282ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4284$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004285if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_save_c_werror_flag=$ac_c_werror_flag
4289 ac_c_werror_flag=yes
4290 ac_cv_prog_cc_g=no
4291 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295int
4296main ()
4297{
4298
4299 ;
4300 return 0;
4301}
4302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004303if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004304 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004305else
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 CFLAGS=""
4307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308/* end confdefs.h. */
4309
4310int
4311main ()
4312{
4313
4314 ;
4315 return 0;
4316}
4317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004318if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319
Matthias Kloseb9621712010-04-24 17:59:49 +00004320else
4321 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324/* end confdefs.h. */
4325
4326int
4327main ()
4328{
4329
4330 ;
4331 return 0;
4332}
4333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004334if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4342 ac_c_werror_flag=$ac_save_c_werror_flag
4343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4345$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004346if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004347 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004348elif test $ac_cv_prog_cc_g = yes; then
4349 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004350 CFLAGS="-g -O2"
4351 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004352 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353 fi
4354else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004355 if test "$GCC" = yes; then
4356 CFLAGS="-O2"
4357 else
4358 CFLAGS=
4359 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4362$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004363if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004365else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004367ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004369/* end confdefs.h. */
4370#include <stdarg.h>
4371#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004372struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004373/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4374struct buf { int x; };
4375FILE * (*rcsopen) (struct buf *, struct stat *, int);
4376static char *e (p, i)
4377 char **p;
4378 int i;
4379{
4380 return p[i];
4381}
4382static char *f (char * (*g) (char **, int), char **p, ...)
4383{
4384 char *s;
4385 va_list v;
4386 va_start (v,p);
4387 s = g (p, va_arg (v,int));
4388 va_end (v);
4389 return s;
4390}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004391
4392/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4393 function prototypes and stuff, but not '\xHH' hex character constants.
4394 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004396 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4397 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004399int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4402 inside strings and character constants. */
4403#define FOO(x) 'x'
4404int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4405
Skip Montanaro6dead952003-09-25 14:50:04 +00004406int test (int i, double x);
4407struct s1 {int (*f) (int a);};
4408struct s2 {int (*f) (double a);};
4409int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4410int argc;
4411char **argv;
4412int
4413main ()
4414{
4415return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4416 ;
4417 return 0;
4418}
4419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4421 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004422do
4423 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004427rm -f core conftest.err conftest.$ac_objext
4428 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004429done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004431CC=$ac_save_CC
4432
4433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434# AC_CACHE_VAL
4435case "x$ac_cv_prog_cc_c89" in
4436 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4438$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4441$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004442 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004443 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4445$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004446esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004447if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004448
Matthias Kloseb9621712010-04-24 17:59:49 +00004449fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004450
Martin v. Löwis11437992002-04-12 09:54:03 +00004451ac_ext=c
4452ac_cpp='$CPP $CPPFLAGS'
4453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4455ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004456
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004457ac_ext=c
4458ac_cpp='$CPP $CPPFLAGS'
4459ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4460ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4461ac_compiler_gnu=$ac_cv_c_compiler_gnu
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4463$as_echo_n "checking how to run the C preprocessor... " >&6; }
4464# On Suns, sometimes $CPP names a directory.
4465if test -n "$CPP" && test -d "$CPP"; then
4466 CPP=
4467fi
4468if test -z "$CPP"; then
4469 if ${ac_cv_prog_CPP+:} false; then :
4470 $as_echo_n "(cached) " >&6
4471else
4472 # Double quotes because CPP needs to be expanded
4473 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4474 do
4475 ac_preproc_ok=false
4476for ac_c_preproc_warn_flag in '' yes
4477do
4478 # Use a header file that comes with gcc, so configuring glibc
4479 # with a fresh cross-compiler works.
4480 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4481 # <limits.h> exists even on freestanding compilers.
4482 # On the NeXT, cc -E runs the code through the compiler's parser,
4483 # not just through cpp. "Syntax error" is here to catch this case.
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#ifdef __STDC__
4487# include <limits.h>
4488#else
4489# include <assert.h>
4490#endif
4491 Syntax error
4492_ACEOF
4493if ac_fn_c_try_cpp "$LINENO"; then :
4494
4495else
4496 # Broken: fails on valid input.
4497continue
4498fi
4499rm -f conftest.err conftest.i conftest.$ac_ext
4500
4501 # OK, works on sane cases. Now check whether nonexistent headers
4502 # can be detected and how.
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504/* end confdefs.h. */
4505#include <ac_nonexistent.h>
4506_ACEOF
4507if ac_fn_c_try_cpp "$LINENO"; then :
4508 # Broken: success on invalid input.
4509continue
4510else
4511 # Passes both tests.
4512ac_preproc_ok=:
4513break
4514fi
4515rm -f conftest.err conftest.i conftest.$ac_ext
4516
4517done
4518# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4519rm -f conftest.i conftest.err conftest.$ac_ext
4520if $ac_preproc_ok; then :
4521 break
4522fi
4523
4524 done
4525 ac_cv_prog_CPP=$CPP
4526
4527fi
4528 CPP=$ac_cv_prog_CPP
4529else
4530 ac_cv_prog_CPP=$CPP
4531fi
4532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4533$as_echo "$CPP" >&6; }
4534ac_preproc_ok=false
4535for ac_c_preproc_warn_flag in '' yes
4536do
4537 # Use a header file that comes with gcc, so configuring glibc
4538 # with a fresh cross-compiler works.
4539 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4540 # <limits.h> exists even on freestanding compilers.
4541 # On the NeXT, cc -E runs the code through the compiler's parser,
4542 # not just through cpp. "Syntax error" is here to catch this case.
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544/* end confdefs.h. */
4545#ifdef __STDC__
4546# include <limits.h>
4547#else
4548# include <assert.h>
4549#endif
4550 Syntax error
4551_ACEOF
4552if ac_fn_c_try_cpp "$LINENO"; then :
4553
4554else
4555 # Broken: fails on valid input.
4556continue
4557fi
4558rm -f conftest.err conftest.i conftest.$ac_ext
4559
4560 # OK, works on sane cases. Now check whether nonexistent headers
4561 # can be detected and how.
4562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4563/* end confdefs.h. */
4564#include <ac_nonexistent.h>
4565_ACEOF
4566if ac_fn_c_try_cpp "$LINENO"; then :
4567 # Broken: success on invalid input.
4568continue
4569else
4570 # Passes both tests.
4571ac_preproc_ok=:
4572break
4573fi
4574rm -f conftest.err conftest.i conftest.$ac_ext
4575
4576done
4577# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4578rm -f conftest.i conftest.err conftest.$ac_ext
4579if $ac_preproc_ok; then :
4580
4581else
4582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4584as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4585See \`config.log' for more details" "$LINENO" 5; }
4586fi
4587
4588ac_ext=c
4589ac_cpp='$CPP $CPPFLAGS'
4590ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4591ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4592ac_compiler_gnu=$ac_cv_c_compiler_gnu
4593
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4595$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4596if ${ac_cv_path_GREP+:} false; then :
4597 $as_echo_n "(cached) " >&6
4598else
4599 if test -z "$GREP"; then
4600 ac_path_GREP_found=false
4601 # Loop through the user's path and test for each of PROGNAME-LIST
4602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4604do
4605 IFS=$as_save_IFS
4606 test -z "$as_dir" && as_dir=.
4607 for ac_prog in grep ggrep; do
4608 for ac_exec_ext in '' $ac_executable_extensions; do
4609 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4610 as_fn_executable_p "$ac_path_GREP" || continue
4611# Check for GNU ac_path_GREP and select it if it is found.
4612 # Check for GNU $ac_path_GREP
4613case `"$ac_path_GREP" --version 2>&1` in
4614*GNU*)
4615 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4616*)
4617 ac_count=0
4618 $as_echo_n 0123456789 >"conftest.in"
4619 while :
4620 do
4621 cat "conftest.in" "conftest.in" >"conftest.tmp"
4622 mv "conftest.tmp" "conftest.in"
4623 cp "conftest.in" "conftest.nl"
4624 $as_echo 'GREP' >> "conftest.nl"
4625 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4626 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4627 as_fn_arith $ac_count + 1 && ac_count=$as_val
4628 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4629 # Best one so far, save it but keep looking for a better one
4630 ac_cv_path_GREP="$ac_path_GREP"
4631 ac_path_GREP_max=$ac_count
4632 fi
4633 # 10*(2^10) chars as input seems more than enough
4634 test $ac_count -gt 10 && break
4635 done
4636 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4637esac
4638
4639 $ac_path_GREP_found && break 3
4640 done
4641 done
4642 done
4643IFS=$as_save_IFS
4644 if test -z "$ac_cv_path_GREP"; then
4645 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4646 fi
4647else
4648 ac_cv_path_GREP=$GREP
4649fi
4650
4651fi
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4653$as_echo "$ac_cv_path_GREP" >&6; }
4654 GREP="$ac_cv_path_GREP"
4655
4656
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004657
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004658
4659
Matthias Kloseb9621712010-04-24 17:59:49 +00004660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4661$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004663# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004664if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004665 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
4667 case $withval in
4668 no) with_cxx_main=no
4669 MAINCC='$(CC)';;
4670 yes) with_cxx_main=yes
4671 MAINCC='$(CXX)';;
4672 *) with_cxx_main=yes
4673 MAINCC=$withval
4674 if test -z "$CXX"
4675 then
4676 CXX=$withval
4677 fi;;
4678 esac
4679else
4680
4681 with_cxx_main=no
4682 MAINCC='$(CC)'
4683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004684fi
4685
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4687$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004688
4689preset_cxx="$CXX"
4690if test -z "$CXX"
4691then
4692 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004693 gcc) if test -n "$ac_tool_prefix"; then
4694 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4695set dummy ${ac_tool_prefix}g++; ac_word=$2
4696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697$as_echo_n "checking for $ac_word... " >&6; }
4698if ${ac_cv_path_CXX+:} false; then :
4699 $as_echo_n "(cached) " >&6
4700else
4701 case $CXX in
4702 [\\/]* | ?:[\\/]*)
4703 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4704 ;;
4705 *)
4706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707for as_dir in notfound
4708do
4709 IFS=$as_save_IFS
4710 test -z "$as_dir" && as_dir=.
4711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004713 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4715 break 2
4716 fi
4717done
4718 done
4719IFS=$as_save_IFS
4720
4721 ;;
4722esac
4723fi
4724CXX=$ac_cv_path_CXX
4725if test -n "$CXX"; then
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4727$as_echo "$CXX" >&6; }
4728else
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730$as_echo "no" >&6; }
4731fi
4732
4733
4734fi
4735if test -z "$ac_cv_path_CXX"; then
4736 ac_pt_CXX=$CXX
4737 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004741if ${ac_cv_path_ac_pt_CXX+:} false; then :
4742 $as_echo_n "(cached) " >&6
4743else
4744 case $ac_pt_CXX in
4745 [\\/]* | ?:[\\/]*)
4746 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4747 ;;
4748 *)
4749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4750for as_dir in notfound
4751do
4752 IFS=$as_save_IFS
4753 test -z "$as_dir" && as_dir=.
4754 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004756 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4758 break 2
4759 fi
4760done
4761 done
4762IFS=$as_save_IFS
4763
4764 ;;
4765esac
4766fi
4767ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4768if test -n "$ac_pt_CXX"; then
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4770$as_echo "$ac_pt_CXX" >&6; }
4771else
4772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776 if test "x$ac_pt_CXX" = x; then
4777 CXX="g++"
4778 else
4779 case $cross_compiling:$ac_tool_warned in
4780yes:)
4781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4783ac_tool_warned=yes ;;
4784esac
4785 CXX=$ac_pt_CXX
4786 fi
4787else
4788 CXX="$ac_cv_path_CXX"
4789fi
4790 ;;
4791 cc) if test -n "$ac_tool_prefix"; then
4792 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4793set dummy ${ac_tool_prefix}c++; ac_word=$2
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004796if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798else
4799 case $CXX in
4800 [\\/]* | ?:[\\/]*)
4801 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4802 ;;
4803 *)
4804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4805for as_dir in notfound
4806do
4807 IFS=$as_save_IFS
4808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 break 2
4814 fi
4815done
Matthias Kloseb9621712010-04-24 17:59:49 +00004816 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004817IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819 ;;
4820esac
4821fi
4822CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004823if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4825$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004826else
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004830
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831
4832fi
4833if test -z "$ac_cv_path_CXX"; then
4834 ac_pt_CXX=$CXX
4835 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4838$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004842 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844 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 +00004845 ;;
4846 *)
4847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4848for as_dir in notfound
4849do
4850 IFS=$as_save_IFS
4851 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004854 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004855 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004856 break 2
4857 fi
4858done
Matthias Kloseb9621712010-04-24 17:59:49 +00004859 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004860IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862 ;;
4863esac
4864fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004865ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4866if test -n "$ac_pt_CXX"; then
4867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4868$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004869else
Matthias Kloseb9621712010-04-24 17:59:49 +00004870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4871$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004873
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004874 if test "x$ac_pt_CXX" = x; then
4875 CXX="c++"
4876 else
4877 case $cross_compiling:$ac_tool_warned in
4878yes:)
4879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4881ac_tool_warned=yes ;;
4882esac
4883 CXX=$ac_pt_CXX
4884 fi
4885else
4886 CXX="$ac_cv_path_CXX"
4887fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004888 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004889 clang|*/clang) if test -n "$ac_tool_prefix"; then
4890 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4891set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4893$as_echo_n "checking for $ac_word... " >&6; }
4894if ${ac_cv_path_CXX+:} false; then :
4895 $as_echo_n "(cached) " >&6
4896else
4897 case $CXX in
4898 [\\/]* | ?:[\\/]*)
4899 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4900 ;;
4901 *)
4902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4903for as_dir in notfound
4904do
4905 IFS=$as_save_IFS
4906 test -z "$as_dir" && as_dir=.
4907 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004908 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004909 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4911 break 2
4912 fi
4913done
4914 done
4915IFS=$as_save_IFS
4916
Ned Deilycbfb9a52012-06-23 16:02:19 -07004917 ;;
4918esac
4919fi
4920CXX=$ac_cv_path_CXX
4921if test -n "$CXX"; then
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4923$as_echo "$CXX" >&6; }
4924else
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4926$as_echo "no" >&6; }
4927fi
4928
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004929
4930fi
4931if test -z "$ac_cv_path_CXX"; then
4932 ac_pt_CXX=$CXX
4933 # Extract the first word of "clang++", so it can be a program name with args.
4934set dummy clang++; ac_word=$2
4935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4936$as_echo_n "checking for $ac_word... " >&6; }
4937if ${ac_cv_path_ac_pt_CXX+:} false; then :
4938 $as_echo_n "(cached) " >&6
4939else
4940 case $ac_pt_CXX in
4941 [\\/]* | ?:[\\/]*)
4942 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4943 ;;
4944 *)
4945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4946for as_dir in notfound
4947do
4948 IFS=$as_save_IFS
4949 test -z "$as_dir" && as_dir=.
4950 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004951 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004952 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4954 break 2
4955 fi
4956done
4957 done
4958IFS=$as_save_IFS
4959
4960 ;;
4961esac
4962fi
4963ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4964if test -n "$ac_pt_CXX"; then
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4966$as_echo "$ac_pt_CXX" >&6; }
4967else
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4969$as_echo "no" >&6; }
4970fi
4971
4972 if test "x$ac_pt_CXX" = x; then
4973 CXX="clang++"
4974 else
4975 case $cross_compiling:$ac_tool_warned in
4976yes:)
4977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4979ac_tool_warned=yes ;;
4980esac
4981 CXX=$ac_pt_CXX
4982 fi
4983else
4984 CXX="$ac_cv_path_CXX"
4985fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004986 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004987 icc|*/icc) if test -n "$ac_tool_prefix"; then
4988 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4989set dummy ${ac_tool_prefix}icpc; ac_word=$2
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991$as_echo_n "checking for $ac_word... " >&6; }
4992if ${ac_cv_path_CXX+:} false; then :
4993 $as_echo_n "(cached) " >&6
4994else
4995 case $CXX in
4996 [\\/]* | ?:[\\/]*)
4997 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4998 ;;
4999 *)
5000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in notfound
5002do
5003 IFS=$as_save_IFS
5004 test -z "$as_dir" && as_dir=.
5005 for ac_exec_ext in '' $ac_executable_extensions; do
5006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5007 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009 break 2
5010 fi
5011done
5012 done
5013IFS=$as_save_IFS
5014
5015 ;;
5016esac
5017fi
5018CXX=$ac_cv_path_CXX
5019if test -n "$CXX"; then
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5021$as_echo "$CXX" >&6; }
5022else
5023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024$as_echo "no" >&6; }
5025fi
5026
5027
5028fi
5029if test -z "$ac_cv_path_CXX"; then
5030 ac_pt_CXX=$CXX
5031 # Extract the first word of "icpc", so it can be a program name with args.
5032set dummy icpc; ac_word=$2
5033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5034$as_echo_n "checking for $ac_word... " >&6; }
5035if ${ac_cv_path_ac_pt_CXX+:} false; then :
5036 $as_echo_n "(cached) " >&6
5037else
5038 case $ac_pt_CXX in
5039 [\\/]* | ?:[\\/]*)
5040 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5041 ;;
5042 *)
5043 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5044for as_dir in notfound
5045do
5046 IFS=$as_save_IFS
5047 test -z "$as_dir" && as_dir=.
5048 for ac_exec_ext in '' $ac_executable_extensions; do
5049 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5050 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5052 break 2
5053 fi
5054done
5055 done
5056IFS=$as_save_IFS
5057
5058 ;;
5059esac
5060fi
5061ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5062if test -n "$ac_pt_CXX"; then
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5064$as_echo "$ac_pt_CXX" >&6; }
5065else
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5067$as_echo "no" >&6; }
5068fi
5069
5070 if test "x$ac_pt_CXX" = x; then
5071 CXX="icpc"
5072 else
5073 case $cross_compiling:$ac_tool_warned in
5074yes:)
5075{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5076$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5077ac_tool_warned=yes ;;
5078esac
5079 CXX=$ac_pt_CXX
5080 fi
5081else
5082 CXX="$ac_cv_path_CXX"
5083fi
5084 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005085 esac
5086 if test "$CXX" = "notfound"
5087 then
5088 CXX=""
5089 fi
5090fi
5091if test -z "$CXX"
5092then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005093 if test -n "$ac_tool_prefix"; then
5094 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5095 do
5096 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5097set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5099$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005100if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102else
5103 if test -n "$CXX"; then
5104 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5105else
5106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109 IFS=$as_save_IFS
5110 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005113 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115 break 2
5116 fi
5117done
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005119IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120
5121fi
5122fi
5123CXX=$ac_cv_prog_CXX
5124if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5126$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005127else
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5129$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005130fi
5131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005132
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005133 test -n "$CXX" && break
5134 done
5135fi
5136if test -z "$CXX"; then
5137 ac_ct_CXX=$CXX
5138 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5139do
5140 # Extract the first word of "$ac_prog", so it can be a program name with args.
5141set dummy $ac_prog; ac_word=$2
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143$as_echo_n "checking for $ac_word... " >&6; }
5144if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5145 $as_echo_n "(cached) " >&6
5146else
5147 if test -n "$ac_ct_CXX"; then
5148 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5149else
5150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151for as_dir in $PATH
5152do
5153 IFS=$as_save_IFS
5154 test -z "$as_dir" && as_dir=.
5155 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005156 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005157 ac_cv_prog_ac_ct_CXX="$ac_prog"
5158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5159 break 2
5160 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005161done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005162 done
5163IFS=$as_save_IFS
5164
5165fi
5166fi
5167ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5168if test -n "$ac_ct_CXX"; then
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5170$as_echo "$ac_ct_CXX" >&6; }
5171else
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173$as_echo "no" >&6; }
5174fi
5175
5176
5177 test -n "$ac_ct_CXX" && break
5178done
5179
5180 if test "x$ac_ct_CXX" = x; then
5181 CXX="notfound"
5182 else
5183 case $cross_compiling:$ac_tool_warned in
5184yes:)
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5186$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5187ac_tool_warned=yes ;;
5188esac
5189 CXX=$ac_ct_CXX
5190 fi
5191fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005192
5193 if test "$CXX" = "notfound"
5194 then
5195 CXX=""
5196 fi
5197fi
5198if test "$preset_cxx" != "$CXX"
5199then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005200 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005201
5202 By default, distutils will build C++ extension modules with \"$CXX\".
5203 If this is not intended, then set CXX on the configure command line.
5204 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005205$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005206
5207 By default, distutils will build C++ extension modules with \"$CXX\".
5208 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005209 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005210fi
5211
5212
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5214
5215
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5217$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5218cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005219#undef bfin
5220#undef cris
5221#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005222#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005223#undef hppa
5224#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005225#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005226#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005227#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005228#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005229#undef unix
5230#if defined(__linux__)
5231# if defined(__x86_64__) && defined(__LP64__)
5232 x86_64-linux-gnu
5233# elif defined(__x86_64__) && defined(__ILP32__)
5234 x86_64-linux-gnux32
5235# elif defined(__i386__)
5236 i386-linux-gnu
5237# elif defined(__aarch64__) && defined(__AARCH64EL__)
5238# if defined(__ILP32__)
5239 aarch64_ilp32-linux-gnu
5240# else
5241 aarch64-linux-gnu
5242# endif
5243# elif defined(__aarch64__) && defined(__AARCH64EB__)
5244# if defined(__ILP32__)
5245 aarch64_be_ilp32-linux-gnu
5246# else
5247 aarch64_be-linux-gnu
5248# endif
5249# elif defined(__alpha__)
5250 alpha-linux-gnu
5251# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5252# if defined(__ARMEL__)
5253 arm-linux-gnueabihf
5254# else
5255 armeb-linux-gnueabihf
5256# endif
5257# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5258# if defined(__ARMEL__)
5259 arm-linux-gnueabi
5260# else
5261 armeb-linux-gnueabi
5262# endif
5263# elif defined(__hppa__)
5264 hppa-linux-gnu
5265# elif defined(__ia64__)
5266 ia64-linux-gnu
5267# elif defined(__m68k__) && !defined(__mcoldfire__)
5268 m68k-linux-gnu
5269# elif defined(__mips_hard_float) && defined(_MIPSEL)
5270# if _MIPS_SIM == _ABIO32
5271 mipsel-linux-gnu
5272# elif _MIPS_SIM == _ABIN32
5273 mips64el-linux-gnuabin32
5274# elif _MIPS_SIM == _ABI64
5275 mips64el-linux-gnuabi64
5276# else
5277# error unknown platform triplet
5278# endif
5279# elif defined(__mips_hard_float)
5280# if _MIPS_SIM == _ABIO32
5281 mips-linux-gnu
5282# elif _MIPS_SIM == _ABIN32
5283 mips64-linux-gnuabin32
5284# elif _MIPS_SIM == _ABI64
5285 mips64-linux-gnuabi64
5286# else
5287# error unknown platform triplet
5288# endif
5289# elif defined(__or1k__)
5290 or1k-linux-gnu
5291# elif defined(__powerpc__) && defined(__SPE__)
5292 powerpc-linux-gnuspe
5293# elif defined(__powerpc64__)
5294# if defined(__LITTLE_ENDIAN__)
5295 powerpc64le-linux-gnu
5296# else
5297 powerpc64-linux-gnu
5298# endif
5299# elif defined(__powerpc__)
5300 powerpc-linux-gnu
5301# elif defined(__s390x__)
5302 s390x-linux-gnu
5303# elif defined(__s390__)
5304 s390-linux-gnu
5305# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5306 sh4-linux-gnu
5307# elif defined(__sparc__) && defined(__arch64__)
5308 sparc64-linux-gnu
5309# elif defined(__sparc__)
5310 sparc-linux-gnu
5311# else
5312# error unknown platform triplet
5313# endif
5314#elif defined(__FreeBSD_kernel__)
5315# if defined(__LP64__)
5316 x86_64-kfreebsd-gnu
5317# elif defined(__i386__)
5318 i386-kfreebsd-gnu
5319# else
5320# error unknown platform triplet
5321# endif
5322#elif defined(__gnu_hurd__)
5323 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005324#elif defined(__APPLE__)
5325 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005326#else
5327# error unknown platform triplet
5328#endif
5329
5330EOF
5331
5332if $CPP conftest.c >conftest.out 2>/dev/null; then
5333 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5335$as_echo "$PLATFORM_TRIPLET" >&6; }
5336else
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5338$as_echo "none" >&6; }
5339fi
5340rm -f conftest.c conftest.out
5341
5342if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5343 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5344 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5345 fi
5346fi
5347PLATDIR=plat-$MACHDEP
5348
5349
5350
5351
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5353$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5354save_LDFLAGS="$LDFLAGS"
5355LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005356
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5358/* end confdefs.h. */
5359
5360int
5361main ()
5362{
5363
5364 ;
5365 return 0;
5366}
5367_ACEOF
5368if ac_fn_c_try_link "$LINENO"; then :
5369 NO_AS_NEEDED="-Wl,--no-as-needed"
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5371$as_echo "yes" >&6; }
5372else
5373 NO_AS_NEEDED=""
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375$as_echo "no" >&6; }
5376fi
5377rm -f core conftest.err conftest.$ac_objext \
5378 conftest$ac_exeext conftest.$ac_ext
5379LDFLAGS="$save_LDFLAGS"
5380
5381
5382
5383# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384
Matthias Kloseb9621712010-04-24 17:59:49 +00005385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5386$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005387if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389else
5390 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5391 then ac_cv_path_EGREP="$GREP -E"
5392 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 # Loop through the user's path and test for each of PROGNAME-LIST
5396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5398do
5399 IFS=$as_save_IFS
5400 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 for ac_prog in egrep; do
5402 for ac_exec_ext in '' $ac_executable_extensions; do
5403 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005404 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005405# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406 # Check for GNU $ac_path_EGREP
5407case `"$ac_path_EGREP" --version 2>&1` in
5408*GNU*)
5409 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5410*)
5411 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413 while :
5414 do
5415 cat "conftest.in" "conftest.in" >"conftest.tmp"
5416 mv "conftest.tmp" "conftest.in"
5417 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5420 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5423 # Best one so far, save it but keep looking for a better one
5424 ac_cv_path_EGREP="$ac_path_EGREP"
5425 ac_path_EGREP_max=$ac_count
5426 fi
5427 # 10*(2^10) chars as input seems more than enough
5428 test $ac_count -gt 10 && break
5429 done
5430 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5431esac
5432
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 $ac_path_EGREP_found && break 3
5434 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005439 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 +00005440 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441else
5442 ac_cv_path_EGREP=$EGREP
5443fi
5444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 fi
5446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5448$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005450
5451
Matthias Kloseb9621712010-04-24 17:59:49 +00005452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5453$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005454if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 $as_echo_n "(cached) " >&6
5456else
5457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005458/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005459#include <stdlib.h>
5460#include <stdarg.h>
5461#include <string.h>
5462#include <float.h>
5463
5464int
5465main ()
5466{
5467
5468 ;
5469 return 0;
5470}
5471_ACEOF
5472if ac_fn_c_try_compile "$LINENO"; then :
5473 ac_cv_header_stdc=yes
5474else
5475 ac_cv_header_stdc=no
5476fi
5477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5478
5479if test $ac_cv_header_stdc = yes; then
5480 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482/* end confdefs.h. */
5483#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005484
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005485_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005487 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005489else
Matthias Kloseb9621712010-04-24 17:59:49 +00005490 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005491fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005492rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
Matthias Kloseb9621712010-04-24 17:59:49 +00005494fi
5495
5496if test $ac_cv_header_stdc = yes; then
5497 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5499/* end confdefs.h. */
5500#include <stdlib.h>
5501
5502_ACEOF
5503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5504 $EGREP "free" >/dev/null 2>&1; then :
5505
5506else
5507 ac_cv_header_stdc=no
5508fi
5509rm -f conftest*
5510
5511fi
5512
5513if test $ac_cv_header_stdc = yes; then
5514 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5515 if test "$cross_compiling" = yes; then :
5516 :
5517else
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h. */
5520#include <ctype.h>
5521#include <stdlib.h>
5522#if ((' ' & 0x0FF) == 0x020)
5523# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5524# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5525#else
5526# define ISLOWER(c) \
5527 (('a' <= (c) && (c) <= 'i') \
5528 || ('j' <= (c) && (c) <= 'r') \
5529 || ('s' <= (c) && (c) <= 'z'))
5530# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5531#endif
5532
5533#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5534int
5535main ()
5536{
5537 int i;
5538 for (i = 0; i < 256; i++)
5539 if (XOR (islower (i), ISLOWER (i))
5540 || toupper (i) != TOUPPER (i))
5541 return 2;
5542 return 0;
5543}
5544_ACEOF
5545if ac_fn_c_try_run "$LINENO"; then :
5546
5547else
5548 ac_cv_header_stdc=no
5549fi
5550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5551 conftest.$ac_objext conftest.beam conftest.$ac_ext
5552fi
5553
5554fi
5555fi
5556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5557$as_echo "$ac_cv_header_stdc" >&6; }
5558if test $ac_cv_header_stdc = yes; then
5559
5560$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5561
5562fi
5563
5564# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5565for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5566 inttypes.h stdint.h unistd.h
5567do :
5568 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5569ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5570"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005571if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005572 cat >>confdefs.h <<_ACEOF
5573#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5574_ACEOF
5575
5576fi
5577
5578done
5579
5580
5581
5582 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 +02005583if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005584 MINIX=yes
5585else
5586 MINIX=
5587fi
5588
5589
5590 if test "$MINIX" = yes; then
5591
5592$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5593
5594
5595$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5596
5597
5598$as_echo "#define _MINIX 1" >>confdefs.h
5599
5600 fi
5601
5602
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5604$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005605if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005606 $as_echo_n "(cached) " >&6
5607else
5608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5609/* end confdefs.h. */
5610
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005611# define __EXTENSIONS__ 1
5612 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005613int
5614main ()
5615{
5616
5617 ;
5618 return 0;
5619}
5620_ACEOF
5621if ac_fn_c_try_compile "$LINENO"; then :
5622 ac_cv_safe_to_define___extensions__=yes
5623else
5624 ac_cv_safe_to_define___extensions__=no
5625fi
5626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5627fi
5628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5629$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5630 test $ac_cv_safe_to_define___extensions__ = yes &&
5631 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5632
5633 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5634
5635 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5636
5637 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5638
5639 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5640
5641
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643# Check for unsupported systems
5644case $ac_sys_system/$ac_sys_release in
5645atheos*|Linux*/1*)
5646 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5647 echo See README for details.
5648 exit 1;;
5649esac
5650
5651
Matthias Kloseb9621712010-04-24 17:59:49 +00005652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5653$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654
5655# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005656if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 withval=$with_suffix;
5658 case $withval in
5659 no) EXEEXT=;;
5660 yes) EXEEXT=.exe;;
5661 *) EXEEXT=$withval;;
5662 esac
5663fi
5664
Matthias Kloseb9621712010-04-24 17:59:49 +00005665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5666$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667
5668# Test whether we're running on a non-case-sensitive system, in which
5669# case we give a warning if no ext is given
5670
Matthias Kloseb9621712010-04-24 17:59:49 +00005671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5672$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673if test ! -d CaseSensitiveTestDir; then
5674mkdir CaseSensitiveTestDir
5675fi
5676
5677if test -d casesensitivetestdir
5678then
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5680$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 BUILDEXEEXT=.exe
5682else
Matthias Kloseb9621712010-04-24 17:59:49 +00005683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685 BUILDEXEEXT=$EXEEXT
5686fi
5687rmdir CaseSensitiveTestDir
5688
5689case $MACHDEP in
5690bsdos*)
5691 case $CC in
5692 gcc) CC="$CC -D_HAVE_BSDI";;
5693 esac;;
5694esac
5695
5696case $ac_sys_system in
5697hp*|HP*)
5698 case $CC in
5699 cc|*/cc) CC="$CC -Ae";;
5700 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701esac
5702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5705$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706if test -z "$LIBRARY"
5707then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005708 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5711$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
5713# LDLIBRARY is the name of the library to link against (as opposed to the
5714# name of the library into which to insert object files). BLDLIBRARY is also
5715# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5716# is blank as the main program is not linked directly against LDLIBRARY.
5717# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5718# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5719# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5720# DLLLIBRARY is the shared (i.e., DLL) library.
5721#
5722# RUNSHARED is used to run shared python without installed libraries
5723#
5724# INSTSONAME is the name of the shared library that will be use to install
5725# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005726#
5727# LDVERSION is the shared library version number, normally the Python version
5728# with the ABI build flags appended.
5729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731
5732
5733
5734
5735
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737LDLIBRARY="$LIBRARY"
5738BLDLIBRARY='$(LDLIBRARY)'
5739INSTSONAME='$(LDLIBRARY)'
5740DLLLIBRARY=''
5741LDLIBRARYDIR=''
5742RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005743LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745# LINKCC is the command that links the python executable -- default is $(CC).
5746# If CXX is set, and if it is needed to link a main function that was
5747# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5748# python might then depend on the C++ runtime
5749# This is altered for AIX in order to build the export list before
5750# linking.
5751
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5753$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754if test -z "$LINKCC"
5755then
5756 LINKCC='$(PURIFY) $(MAINCC)'
5757 case $ac_sys_system in
5758 AIX*)
5759 exp_extra="\"\""
5760 if test $ac_sys_release -ge 5 -o \
5761 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5762 exp_extra="."
5763 fi
5764 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 QNX*)
5766 # qcc must be used because the other compilers do not
5767 # support -N.
5768 LINKCC=qcc;;
5769 esac
5770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5772$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773
5774# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5775# make sure we default having it set to "no": this is used by
5776# distutils.unixccompiler to know if it should add --enable-new-dtags
5777# to linker command lines, and failing to detect GNU ld simply results
5778# in the same bahaviour as before.
5779
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5781$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782ac_prog=ld
5783if test "$GCC" = yes; then
5784 ac_prog=`$CC -print-prog-name=ld`
5785fi
5786case `"$ac_prog" -V 2>&1 < /dev/null` in
5787 *GNU*)
5788 GNULD=yes;;
5789 *)
5790 GNULD=no;;
5791esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5793$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5796$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005797if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005798 $as_echo_n "(cached) " >&6
5799else
5800 ac_cv_c_inline=no
5801for ac_kw in inline __inline__ __inline; do
5802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5803/* end confdefs.h. */
5804#ifndef __cplusplus
5805typedef int foo_t;
5806static $ac_kw foo_t static_foo () {return 0; }
5807$ac_kw foo_t foo () {return 0; }
5808#endif
5809
5810_ACEOF
5811if ac_fn_c_try_compile "$LINENO"; then :
5812 ac_cv_c_inline=$ac_kw
5813fi
5814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5815 test "$ac_cv_c_inline" != no && break
5816done
5817
5818fi
5819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5820$as_echo "$ac_cv_c_inline" >&6; }
5821
5822case $ac_cv_c_inline in
5823 inline | yes) ;;
5824 *)
5825 case $ac_cv_c_inline in
5826 no) ac_val=;;
5827 *) ac_val=$ac_cv_c_inline;;
5828 esac
5829 cat >>confdefs.h <<_ACEOF
5830#ifndef __cplusplus
5831#define inline $ac_val
5832#endif
5833_ACEOF
5834 ;;
5835esac
5836
5837if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005838
5839$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005840
5841
5842fi
5843
5844
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5846$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005848if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849 enableval=$enable_shared;
5850fi
5851
5852
5853if test -z "$enable_shared"
5854then
5855 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005856 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857 enable_shared="yes";;
5858 *)
5859 enable_shared="no";;
5860 esac
5861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5863$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5866$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005868if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005869 enableval=$enable_profiling;
5870fi
5871
5872if test "x$enable_profiling" = xyes; then
5873 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005874 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876/* end confdefs.h. */
5877int main() { return 0; }
5878_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879if ac_fn_c_try_link "$LINENO"; then :
5880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005882 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005884rm -f core conftest.err conftest.$ac_objext \
5885 conftest$ac_exeext conftest.$ac_ext
5886 CC="$ac_save_cc"
5887else
5888 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5891$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892
doko@ubuntu.comba015832012-06-30 16:52:05 +02005893if test "x$enable_profiling" = xyes; then
5894 BASECFLAGS="-pg $BASECFLAGS"
5895 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896fi
5897
Matthias Kloseb9621712010-04-24 17:59:49 +00005898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5899$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
5901# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5902# library that we build, but we do not want to link against it (we
5903# will find it with a -framework option). For this reason there is an
5904# extra variable BLDLIBRARY against which Python and the extension
5905# modules are linked, BLDLIBRARY. This is normally the same as
5906# LDLIBRARY, but empty for MacOSX framework builds.
5907if test "$enable_framework"
5908then
5909 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005910 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 BLDLIBRARY=''
5912else
5913 BLDLIBRARY='$(LDLIBRARY)'
5914fi
5915
5916# Other platforms follow
5917if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005918 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
Matthias Kloseb9621712010-04-24 17:59:49 +00005920$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921
5922 case $ac_sys_system in
5923 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).dll.a'
5925 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 ;;
5927 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005928 LDLIBRARY='libpython$(LDVERSION).so'
5929 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005930 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005932 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005933 then
5934 PY3LIBRARY=libpython3.so
5935 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005937 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005938 LDLIBRARY='libpython$(LDVERSION).so'
5939 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005940 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005942 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005943 then
5944 PY3LIBRARY=libpython3.so
5945 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 ;;
5947 hp*|HP*)
5948 case `uname -m` in
5949 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
5952 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 ;;
5955 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005957 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005960 LDLIBRARY='libpython$(LDVERSION).dylib'
5961 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005962 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005964 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005965 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005966 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005967 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968
5969 esac
5970else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005971 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 case $ac_sys_system in
5973 CYGWIN*)
5974 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005975 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 ;;
5977 esac
5978fi
5979
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005980if test "$cross_compiling" = yes; then
5981 RUNSHARED=
5982fi
5983
Matthias Kloseb9621712010-04-24 17:59:49 +00005984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5985$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986
5987if test -n "$ac_tool_prefix"; then
5988 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5989set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005992if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994else
5995 if test -n "$RANLIB"; then
5996 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5997else
5998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001 IFS=$as_save_IFS
6002 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007 break 2
6008 fi
6009done
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011IFS=$as_save_IFS
6012
6013fi
6014fi
6015RANLIB=$ac_cv_prog_RANLIB
6016if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6018$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019else
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022fi
6023
6024
6025fi
6026if test -z "$ac_cv_prog_RANLIB"; then
6027 ac_ct_RANLIB=$RANLIB
6028 # Extract the first word of "ranlib", so it can be a program name with args.
6029set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006032if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034else
6035 if test -n "$ac_ct_RANLIB"; then
6036 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6037else
6038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039for as_dir in $PATH
6040do
6041 IFS=$as_save_IFS
6042 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047 break 2
6048 fi
6049done
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051IFS=$as_save_IFS
6052
6053fi
6054fi
6055ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6056if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6058$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059else
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062fi
6063
6064 if test "x$ac_ct_RANLIB" = x; then
6065 RANLIB=":"
6066 else
6067 case $cross_compiling:$ac_tool_warned in
6068yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006069{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6070$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071ac_tool_warned=yes ;;
6072esac
6073 RANLIB=$ac_ct_RANLIB
6074 fi
6075else
6076 RANLIB="$ac_cv_prog_RANLIB"
6077fi
6078
6079
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006080if test -n "$ac_tool_prefix"; then
6081 for ac_prog in ar aal
6082 do
6083 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6084set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6086$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006087if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089else
6090 if test -n "$AR"; then
6091 ac_cv_prog_AR="$AR" # Let the user override the test.
6092else
6093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6094for as_dir in $PATH
6095do
6096 IFS=$as_save_IFS
6097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006100 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102 break 2
6103 fi
6104done
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106IFS=$as_save_IFS
6107
6108fi
6109fi
6110AR=$ac_cv_prog_AR
6111if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6113$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114else
Matthias Kloseb9621712010-04-24 17:59:49 +00006115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6116$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117fi
6118
6119
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006120 test -n "$AR" && break
6121 done
6122fi
6123if test -z "$AR"; then
6124 ac_ct_AR=$AR
6125 for ac_prog in ar aal
6126do
6127 # Extract the first word of "$ac_prog", so it can be a program name with args.
6128set dummy $ac_prog; ac_word=$2
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6130$as_echo_n "checking for $ac_word... " >&6; }
6131if ${ac_cv_prog_ac_ct_AR+:} false; then :
6132 $as_echo_n "(cached) " >&6
6133else
6134 if test -n "$ac_ct_AR"; then
6135 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6136else
6137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140 IFS=$as_save_IFS
6141 test -z "$as_dir" && as_dir=.
6142 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006144 ac_cv_prog_ac_ct_AR="$ac_prog"
6145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146 break 2
6147 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006149 done
6150IFS=$as_save_IFS
6151
6152fi
6153fi
6154ac_ct_AR=$ac_cv_prog_ac_ct_AR
6155if test -n "$ac_ct_AR"; then
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6157$as_echo "$ac_ct_AR" >&6; }
6158else
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160$as_echo "no" >&6; }
6161fi
6162
6163
6164 test -n "$ac_ct_AR" && break
6165done
6166
6167 if test "x$ac_ct_AR" = x; then
6168 AR="ar"
6169 else
6170 case $cross_compiling:$ac_tool_warned in
6171yes:)
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6174ac_tool_warned=yes ;;
6175esac
6176 AR=$ac_ct_AR
6177 fi
6178fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179
6180
6181# tweak ARFLAGS only if the user didn't set it on the command line
6182
6183if test -z "$ARFLAGS"
6184then
6185 ARFLAGS="rc"
6186fi
6187
doko@ubuntu.com58844492012-06-30 18:25:32 +02006188if test -n "$ac_tool_prefix"; then
6189 for ac_prog in readelf
6190 do
6191 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6192set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6194$as_echo_n "checking for $ac_word... " >&6; }
6195if ${ac_cv_prog_READELF+:} false; then :
6196 $as_echo_n "(cached) " >&6
6197else
6198 if test -n "$READELF"; then
6199 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6200else
6201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH
6203do
6204 IFS=$as_save_IFS
6205 test -z "$as_dir" && as_dir=.
6206 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006207 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006208 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6209 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6210 break 2
6211 fi
6212done
6213 done
6214IFS=$as_save_IFS
6215
6216fi
6217fi
6218READELF=$ac_cv_prog_READELF
6219if test -n "$READELF"; then
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6221$as_echo "$READELF" >&6; }
6222else
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6224$as_echo "no" >&6; }
6225fi
6226
6227
6228 test -n "$READELF" && break
6229 done
6230fi
6231if test -z "$READELF"; then
6232 ac_ct_READELF=$READELF
6233 for ac_prog in readelf
6234do
6235 # Extract the first word of "$ac_prog", so it can be a program name with args.
6236set dummy $ac_prog; ac_word=$2
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6238$as_echo_n "checking for $ac_word... " >&6; }
6239if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6240 $as_echo_n "(cached) " >&6
6241else
6242 if test -n "$ac_ct_READELF"; then
6243 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6244else
6245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246for as_dir in $PATH
6247do
6248 IFS=$as_save_IFS
6249 test -z "$as_dir" && as_dir=.
6250 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006251 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006252 ac_cv_prog_ac_ct_READELF="$ac_prog"
6253 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6254 break 2
6255 fi
6256done
6257 done
6258IFS=$as_save_IFS
6259
6260fi
6261fi
6262ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6263if test -n "$ac_ct_READELF"; then
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6265$as_echo "$ac_ct_READELF" >&6; }
6266else
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6268$as_echo "no" >&6; }
6269fi
6270
6271
6272 test -n "$ac_ct_READELF" && break
6273done
6274
6275 if test "x$ac_ct_READELF" = x; then
6276 READELF=":"
6277 else
6278 case $cross_compiling:$ac_tool_warned in
6279yes:)
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6281$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6282ac_tool_warned=yes ;;
6283esac
6284 READELF=$ac_ct_READELF
6285 fi
6286fi
6287
6288if test "$cross_compiling" = yes; then
6289 case "$READELF" in
6290 readelf|:)
6291 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6292 ;;
6293 esac
6294fi
6295
6296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006297
Matthias Klosec4c48422012-10-21 23:05:35 +02006298for ac_prog in python$PACKAGE_VERSION python3 python
6299do
6300 # Extract the first word of "$ac_prog", so it can be a program name with args.
6301set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6303$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006304if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006305 $as_echo_n "(cached) " >&6
6306else
Matthias Klosec4c48422012-10-21 23:05:35 +02006307 if test -n "$PYTHON"; then
6308 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006309else
6310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6311for as_dir in $PATH
6312do
6313 IFS=$as_save_IFS
6314 test -z "$as_dir" && as_dir=.
6315 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006316 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006317 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6319 break 2
6320 fi
6321done
6322 done
6323IFS=$as_save_IFS
6324
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006325fi
6326fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006327PYTHON=$ac_cv_prog_PYTHON
6328if test -n "$PYTHON"; then
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6330$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006331else
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333$as_echo "no" >&6; }
6334fi
6335
6336
Matthias Klosec4c48422012-10-21 23:05:35 +02006337 test -n "$PYTHON" && break
6338done
6339test -n "$PYTHON" || PYTHON="not-found"
6340
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006341if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006342 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6343else
6344 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006345fi
6346
6347
Kushal Das02d23a22014-04-15 23:50:06 +05306348for ac_prog in python$PACKAGE_VERSION python3 python
6349do
6350 # Extract the first word of "$ac_prog", so it can be a program name with args.
6351set dummy $ac_prog; ac_word=$2
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353$as_echo_n "checking for $ac_word... " >&6; }
6354if ${ac_cv_prog_PYTHON+:} false; then :
6355 $as_echo_n "(cached) " >&6
6356else
6357 if test -n "$PYTHON"; then
6358 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6359else
6360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361for as_dir in $PATH
6362do
6363 IFS=$as_save_IFS
6364 test -z "$as_dir" && as_dir=.
6365 for ac_exec_ext in '' $ac_executable_extensions; do
6366 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6367 ac_cv_prog_PYTHON="$ac_prog"
6368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6369 break 2
6370 fi
6371done
6372 done
6373IFS=$as_save_IFS
6374
6375fi
6376fi
6377PYTHON=$ac_cv_prog_PYTHON
6378if test -n "$PYTHON"; then
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6380$as_echo "$PYTHON" >&6; }
6381else
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383$as_echo "no" >&6; }
6384fi
6385
6386
6387 test -n "$PYTHON" && break
6388done
6389test -n "$PYTHON" || PYTHON="not-found"
6390
6391if test "$PYTHON" = not-found; then
6392 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6393else
6394 OPCODEHGEN="$PYTHON"
6395fi
6396
6397
6398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399case $MACHDEP in
6400bsdos*|hp*|HP*)
6401 # install -d does not work on BSDI or HP-UX
6402 if test -z "$INSTALL"
6403 then
6404 INSTALL="${srcdir}/install-sh -c"
6405 fi
6406esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407# Find a good install program. We prefer a C program (faster),
6408# so one script is as good as another. But avoid the broken or
6409# incompatible versions:
6410# SysV /etc/install, /usr/sbin/install
6411# SunOS /usr/etc/install
6412# IRIX /sbin/install
6413# AIX /bin/install
6414# AmigaOS /C/install, which installs bootblocks on floppy discs
6415# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6416# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6417# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6418# OS/2's system install, which has a completely different semantic
6419# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006420# Reject install programs that cannot install multiple files.
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6422$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006424if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006425 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426else
6427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430 IFS=$as_save_IFS
6431 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006432 # Account for people who put trailing slashes in PATH elements.
6433case $as_dir/ in #((
6434 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006436 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437 /usr/ucb/* ) ;;
6438 *)
6439 # OSF1 and SCO ODT 3.0 have their own names for install.
6440 # Don't use installbsd from OSF since it installs stuff as root
6441 # by default.
6442 for ac_prog in ginstall scoinst install; do
6443 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006444 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 if test $ac_prog = install &&
6446 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6447 # AIX install. It has an incompatible calling convention.
6448 :
6449 elif test $ac_prog = install &&
6450 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6451 # program-specific install script used by HP pwplus--don't use.
6452 :
6453 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006454 rm -rf conftest.one conftest.two conftest.dir
6455 echo one > conftest.one
6456 echo two > conftest.two
6457 mkdir conftest.dir
6458 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6459 test -s conftest.one && test -s conftest.two &&
6460 test -s conftest.dir/conftest.one &&
6461 test -s conftest.dir/conftest.two
6462 then
6463 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6464 break 3
6465 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006466 fi
6467 fi
6468 done
6469 done
6470 ;;
6471esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006472
6473 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006474IFS=$as_save_IFS
6475
Matthias Kloseb9621712010-04-24 17:59:49 +00006476rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006477
6478fi
6479 if test "${ac_cv_path_install+set}" = set; then
6480 INSTALL=$ac_cv_path_install
6481 else
6482 # As a last resort, use the slow shell script. Don't cache a
6483 # value for INSTALL within a source directory, because that will
6484 # break other packages using the cache if that directory is
6485 # removed, or if the value is a relative name.
6486 INSTALL=$ac_install_sh
6487 fi
6488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6490$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006491
6492# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6493# It thinks the first close brace ends the variable substitution.
6494test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6495
6496test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6497
6498test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6499
Matthias Klose93a0ef12012-03-15 18:08:34 +01006500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6501$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6502if test -z "$MKDIR_P"; then
6503 if ${ac_cv_path_mkdir+:} false; then :
6504 $as_echo_n "(cached) " >&6
6505else
6506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6507for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6508do
6509 IFS=$as_save_IFS
6510 test -z "$as_dir" && as_dir=.
6511 for ac_prog in mkdir gmkdir; do
6512 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006513 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006514 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6515 'mkdir (GNU coreutils) '* | \
6516 'mkdir (coreutils) '* | \
6517 'mkdir (fileutils) '4.1*)
6518 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6519 break 3;;
6520 esac
6521 done
6522 done
6523 done
6524IFS=$as_save_IFS
6525
6526fi
6527
6528 test -d ./--version && rmdir ./--version
6529 if test "${ac_cv_path_mkdir+set}" = set; then
6530 MKDIR_P="$ac_cv_path_mkdir -p"
6531 else
6532 # As a last resort, use the slow shell script. Don't cache a
6533 # value for MKDIR_P within a source directory, because that will
6534 # break other packages using the cache if that directory is
6535 # removed, or if the value is a relative name.
6536 MKDIR_P="$ac_install_sh -d"
6537 fi
6538fi
6539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6540$as_echo "$MKDIR_P" >&6; }
6541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006542
6543# Not every filesystem supports hard links
6544
6545if test -z "$LN" ; then
6546 case $ac_sys_system in
6547 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006548 *) LN=ln;;
6549 esac
6550fi
6551
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006552# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006553
6554ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006555
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6558$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006559
6560# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006561if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562 withval=$with_pydebug;
6563if test "$withval" != no
6564then
6565
Matthias Kloseb9621712010-04-24 17:59:49 +00006566$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006567
Matthias Kloseb9621712010-04-24 17:59:49 +00006568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6569$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006571 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006572else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6573$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574fi
6575else
Matthias Kloseb9621712010-04-24 17:59:49 +00006576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6577$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006578fi
6579
6580
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006581# Enable LTO flags
6582
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6584$as_echo_n "checking for --with-lto... " >&6; }
6585
6586# Check whether --with-lto was given.
6587if test "${with_lto+set}" = set; then :
6588 withval=$with_lto;
6589if test "$withval" != no
6590then
6591 Py_LTO='true'
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6593$as_echo "yes" >&6; };
6594else
6595 Py_LTO='false'
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6597$as_echo "no" >&6; };
6598fi
6599else
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6601$as_echo "no" >&6; }
6602fi
6603
6604if test "$Py_LTO" = 'true' ; then
6605 case $CC in
6606 *clang*)
6607 # Any changes made here should be reflected in the GCC+Darwin case below
6608 LTOFLAGS="-flto"
6609 ;;
6610 *gcc*)
6611 case $ac_sys_system in
6612 Darwin*)
6613 LTOFLAGS="-flto"
6614 ;;
6615 *)
6616 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6617 ;;
6618 esac
6619 ;;
6620 esac
6621fi
6622
Brett Cannon7188a3e2015-09-18 15:13:44 -07006623# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006624
6625
6626
6627
6628
6629
Brett Cannon7188a3e2015-09-18 15:13:44 -07006630# Extract the first word of "llvm-profdata", so it can be a program name with args.
6631set dummy llvm-profdata; ac_word=$2
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6633$as_echo_n "checking for $ac_word... " >&6; }
6634if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6635 $as_echo_n "(cached) " >&6
6636else
6637 if test -n "$LLVM_PROF_FOUND"; then
6638 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6639else
6640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6641for as_dir in $PATH
6642do
6643 IFS=$as_save_IFS
6644 test -z "$as_dir" && as_dir=.
6645 for ac_exec_ext in '' $ac_executable_extensions; do
6646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6647 ac_cv_prog_LLVM_PROF_FOUND="found"
6648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6649 break 2
6650 fi
6651done
6652 done
6653IFS=$as_save_IFS
6654
6655 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6656fi
6657fi
6658LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6659if test -n "$LLVM_PROF_FOUND"; then
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6661$as_echo "$LLVM_PROF_FOUND" >&6; }
6662else
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6664$as_echo "no" >&6; }
6665fi
6666
6667
6668LLVM_PROF_ERR=no
6669case $CC in
6670 *clang*)
6671 # Any changes made here should be reflected in the GCC+Darwin case below
6672 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6673 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6674 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6675 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6676 if test $LLVM_PROF_FOUND = not-found
6677 then
6678 LLVM_PROF_ERR=yes
6679 fi
6680 ;;
6681 *gcc*)
6682 case $ac_sys_system in
6683 Darwin*)
6684 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6685 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6686 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6687 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6688 if test $LLVM_PROF_FOUND = not-found
6689 then
6690 LLVM_PROF_ERR=yes
6691 fi
6692 ;;
6693 *)
6694 PGO_PROF_GEN_FLAG="-fprofile-generate"
6695 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6696 LLVM_PROF_MERGER="true"
6697 LLVM_PROF_FILE=""
6698 ;;
6699 esac
6700 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006701 *icc*)
6702 PGO_PROF_GEN_FLAG="-prof-gen"
6703 PGO_PROF_USE_FLAG="-prof-use"
6704 LLVM_PROF_MERGER="true"
6705 LLVM_PROF_FILE=""
6706 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006707esac
6708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6710# merged with this chunk of code?
6711
6712# Optimizer/debugger flags
6713# ------------------------
6714# (The following bit of code is complicated enough - please keep things
6715# indented properly. Just pretend you're editing Python code. ;-)
6716
6717# There are two parallel sets of case statements below, one that checks to
6718# see if OPT was set and one that does BASECFLAGS setting based upon
6719# compiler and platform. BASECFLAGS tweaks need to be made even if the
6720# user set OPT.
6721
6722# tweak OPT based on compiler and platform, only if the user didn't set
6723# it on the command line
6724
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006725if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726then
6727 case $GCC in
6728 yes)
6729 if test "$CC" != 'g++' ; then
6730 STRICT_PROTO="-Wstrict-prototypes"
6731 fi
6732 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6733 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6734 WRAP="-fwrapv"
6735 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006736
6737 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006738 case $CC in
6739 *clang*) WRAP="-fwrapv"
6740 ;;
6741 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743 case $ac_cv_prog_cc_g in
6744 yes)
6745 if test "$Py_DEBUG" = 'true' ; then
6746 # Optimization messes up debuggers, so turn it off for
6747 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006748 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6749 OPT="-g -Og -Wall $STRICT_PROTO"
6750 else
6751 OPT="-g -O0 -Wall $STRICT_PROTO"
6752 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753 else
6754 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6755 fi
6756 ;;
6757 *)
6758 OPT="-O3 -Wall $STRICT_PROTO"
6759 ;;
6760 esac
6761 case $ac_sys_system in
6762 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6763 ;;
6764 esac
6765 ;;
6766
6767 *)
6768 OPT="-O"
6769 ;;
6770 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006771fi
6772
6773
6774
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776# The -arch flags for universal builds on OSX
6777UNIVERSAL_ARCH_FLAGS=
6778
6779
6780# tweak BASECFLAGS based on compiler and platform
6781case $GCC in
6782yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006783 # Python doesn't violate C99 aliasing rules, but older versions of
6784 # GCC produce warnings for legal Python code. Enable
6785 # -fno-strict-aliasing on versions of GCC that support but produce
6786 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6788$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789 ac_save_cc="$CC"
6790 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006791 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006792 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006797
Matthias Kloseb159a552010-04-25 21:00:44 +00006798
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006799int
6800main ()
6801{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006802
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006803 ;
6804 return 0;
6805}
Matthias Kloseb159a552010-04-25 21:00:44 +00006806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006808if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006809
6810 CC="$ac_save_cc -fstrict-aliasing"
6811 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006813/* end confdefs.h. */
6814
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006815 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006816int
6817main ()
6818{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006819double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006820 ;
6821 return 0;
6822}
Matthias Kloseb159a552010-04-25 21:00:44 +00006823
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006825if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006826
6827 ac_cv_no_strict_aliasing=no
6828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829else
Matthias Kloseb159a552010-04-25 21:00:44 +00006830
6831 ac_cv_no_strict_aliasing=yes
6832
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006833fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006835
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006836else
Matthias Kloseb159a552010-04-25 21:00:44 +00006837
6838 ac_cv_no_strict_aliasing=no
6839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006842fi
6843
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006844 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6847$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006848 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 then
6850 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6851 fi
6852
Zachary Ware5af85642015-12-21 12:09:17 -06006853 # ICC doesn't recognize the option, but only emits a warning
6854 ## XXX does it emit an unused result warning and can it be disabled?
6855 case "$CC" in
6856 *icc*)
6857 ac_cv_disable_unused_result_warning=no
6858 ;;
6859 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6861$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6862 ac_save_cc="$CC"
6863 CC="$CC -Wunused-result -Werror"
6864 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006865 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006866 $as_echo_n "(cached) " >&6
6867else
6868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6869/* end confdefs.h. */
6870
6871
6872int
6873main ()
6874{
6875
6876 ;
6877 return 0;
6878}
6879
6880_ACEOF
6881if ac_fn_c_try_compile "$LINENO"; then :
6882
6883 ac_cv_disable_unused_result_warning=yes
6884
6885else
6886
6887 ac_cv_disable_unused_result_warning=no
6888
6889fi
6890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6891fi
6892
6893 CFLAGS="$save_CFLAGS"
6894 CC="$ac_save_cc"
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6896$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006897 ;;
6898 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006899
6900 if test $ac_cv_disable_unused_result_warning = yes
6901 then
6902 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6903 fi
6904
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6906$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6907 ac_save_cc="$CC"
6908 CC="$CC -Werror=declaration-after-statement"
6909 save_CFLAGS="$CFLAGS"
6910 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6911 $as_echo_n "(cached) " >&6
6912else
6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914/* end confdefs.h. */
6915
6916
6917int
6918main ()
6919{
6920
6921 ;
6922 return 0;
6923}
6924
6925_ACEOF
6926if ac_fn_c_try_compile "$LINENO"; then :
6927
6928 ac_cv_declaration_after_statement_warning=yes
6929
6930else
6931
6932 ac_cv_declaration_after_statement_warning=no
6933
6934fi
6935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6936fi
6937
6938 CFLAGS="$save_CFLAGS"
6939 CC="$ac_save_cc"
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6941$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6942
6943 if test $ac_cv_declaration_after_statement_warning = yes
6944 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006945 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006946 fi
6947
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6949$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6950 ac_save_cc="$CC"
6951 CC="$CC -Wsign-compare"
6952 save_CFLAGS="$CFLAGS"
6953 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6954 $as_echo_n "(cached) " >&6
6955else
6956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6957/* end confdefs.h. */
6958
6959
6960int
6961main ()
6962{
6963
6964 ;
6965 return 0;
6966}
6967
6968_ACEOF
6969if ac_fn_c_try_compile "$LINENO"; then :
6970
6971 ac_cv_enable_sign_compare_warning=yes
6972
6973else
6974
6975 ac_cv_enable_sign_compare_warning=no
6976
6977fi
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6979fi
6980
6981 CFLAGS="$save_CFLAGS"
6982 CC="$ac_save_cc"
6983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6984$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6985
6986 if test $ac_cv_enable_sign_compare_warning = yes
6987 then
6988 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6989 fi
6990
6991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6992$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6993 ac_save_cc="$CC"
6994 CC="$CC -Wunreachable-code"
6995 save_CFLAGS="$CFLAGS"
6996 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6997 $as_echo_n "(cached) " >&6
6998else
6999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7000/* end confdefs.h. */
7001
7002
7003int
7004main ()
7005{
7006
7007 ;
7008 return 0;
7009}
7010
7011_ACEOF
7012if ac_fn_c_try_compile "$LINENO"; then :
7013
7014 ac_cv_enable_unreachable_code_warning=yes
7015
7016else
7017
7018 ac_cv_enable_unreachable_code_warning=no
7019
7020fi
7021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7022fi
7023
7024 CFLAGS="$save_CFLAGS"
7025 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007026
7027 # Don't enable unreachable code warning in debug mode, since it usually
7028 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007029 # Issue #24324: Unfortunately, the unreachable code warning does not work
7030 # correctly on gcc and has been silently removed from the compiler.
7031 # It is supported on clang but on OS X systems gcc may be an alias
7032 # for clang. Try to determine if the compiler is not really gcc and,
7033 # if so, only then enable the warning.
7034 if test $ac_cv_enable_unreachable_code_warning = yes && \
7035 test "$Py_DEBUG" != "true" && \
7036 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007037 then
7038 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007039 else
7040 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007041 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7043$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007044
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007045 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7046 # support. Without this, treatment of subnormals doesn't follow
7047 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007048 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007049 alpha*)
7050 BASECFLAGS="$BASECFLAGS -mieee"
7051 ;;
7052 esac
7053
7054 case $ac_sys_system in
7055 SCO_SV*)
7056 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7057 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007058
7059 # is there any other compiler on Darwin besides gcc?
7060 Darwin*)
7061 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7062 # used to be here, but non-Apple gcc doesn't accept them.
7063 if test "${CC}" = gcc
7064 then
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007066$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007067 case "${UNIVERSALSDK}" in
7068 */MacOSX10.4u.sdk)
7069 # Build using 10.4 SDK, force usage of gcc when the
7070 # compiler is gcc, otherwise the user will get very
7071 # confusing error messages when building on OSX 10.6
7072 CC=gcc-4.0
7073 CPP=cpp-4.0
7074 ;;
7075 esac
7076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007077$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007078 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007079
Ned Deily87adb6e2013-10-18 21:09:56 -07007080 if test "${enable_universalsdk}"
7081 then
7082 case "$UNIVERSAL_ARCHS" in
7083 32-bit)
7084 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7085 LIPO_32BIT_FLAGS=""
7086 ARCH_RUN_32BIT=""
7087 ;;
7088 64-bit)
7089 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7090 LIPO_32BIT_FLAGS=""
7091 ARCH_RUN_32BIT="true"
7092 ;;
7093 all)
7094 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7095 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7096 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7097 ;;
7098 intel)
7099 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7100 LIPO_32BIT_FLAGS="-extract i386"
7101 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7102 ;;
7103 intel-32)
7104 UNIVERSAL_ARCH_FLAGS="-arch i386"
7105 LIPO_32BIT_FLAGS=""
7106 ARCH_RUN_32BIT=""
7107 ;;
7108 3-way)
7109 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7110 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7111 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7112 ;;
7113 *)
7114 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7115 ;;
7116 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007117
Ned Deily87adb6e2013-10-18 21:09:56 -07007118 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7119 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7120 if test "${UNIVERSALSDK}" != "/"
7121 then
7122 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7123 fi
7124 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007125
Ned Deily87adb6e2013-10-18 21:09:56 -07007126 # Calculate an appropriate deployment target for this build:
7127 # The deployment target value is used explicitly to enable certain
7128 # features are enabled (such as builtin libedit support for readline)
7129 # through the use of Apple's Availabiliy Macros and is used as a
7130 # component of the string returned by distutils.get_platform().
7131 #
7132 # Use the value from:
7133 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7134 # 2. the operating system version of the build machine if >= 10.6
7135 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7136 # below to pick either 10.3, 10.4, or 10.5 as the target.
7137 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007138
Ned Deily87adb6e2013-10-18 21:09:56 -07007139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7140$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007141 cur_target_major=`sw_vers -productVersion | \
7142 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7143 cur_target_minor=`sw_vers -productVersion | \
7144 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7145 cur_target="${cur_target_major}.${cur_target_minor}"
7146 if test ${cur_target_major} -eq 10 && \
7147 test ${cur_target_minor} -ge 3 && \
7148 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007149 then
Ned Deily36820b62014-06-25 13:44:22 -07007150 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007151 cur_target=10.3
7152 if test ${enable_universalsdk}
7153 then
7154 case "$UNIVERSAL_ARCHS" in
7155 all|3-way|intel|64-bit)
7156 # These configurations were first supported in 10.5
7157 cur_target='10.5'
7158 ;;
7159 esac
7160 else
7161 if test `/usr/bin/arch` = "i386"
7162 then
7163 # 10.4 was the first release to support Intel archs
7164 cur_target="10.4"
7165 fi
7166 fi
7167 fi
7168 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007169
Ned Deily87adb6e2013-10-18 21:09:56 -07007170 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7171 # environment with a value that is the same as what we'll use
7172 # in the Makefile to ensure that we'll get the same compiler
7173 # environment during configure and build time.
7174 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7175 export MACOSX_DEPLOYMENT_TARGET
7176 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7178$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007179
Ned Deily87adb6e2013-10-18 21:09:56 -07007180 # end of Darwin* tests
7181 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007182 esac
7183 ;;
7184
7185*)
7186 case $ac_sys_system in
7187 OpenUNIX*|UnixWare*)
7188 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7189 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190 SCO_SV*)
7191 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7192 ;;
7193 esac
7194 ;;
7195esac
7196
Zachary Ware5af85642015-12-21 12:09:17 -06007197# ICC needs -fp-model strict or floats behave badly
7198case "$CC" in
7199*icc*)
7200 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7201 ;;
7202esac
7203
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007204if test "$Py_DEBUG" = 'true'; then
7205 :
7206else
7207 OPT="-DNDEBUG $OPT"
7208fi
7209
7210if test "$ac_arch_flags"
7211then
7212 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7213fi
7214
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215# On some compilers, pthreads are available without further options
7216# (e.g. MacOS X). On some of these systems, the compiler will not
7217# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7218# So we have to see first whether pthreads are available without
7219# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7221$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007222if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007223 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007224else
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007226 ac_cv_pthread_is_default=no
7227else
Matthias Kloseb9621712010-04-24 17:59:49 +00007228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007229/* end confdefs.h. */
7230
Stefan Krah7dba5942012-11-22 22:49:11 +01007231#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232#include <pthread.h>
7233
7234void* routine(void* p){return NULL;}
7235
7236int main(){
7237 pthread_t p;
7238 if(pthread_create(&p,NULL,routine,NULL)!=0)
7239 return 1;
7240 (void)pthread_detach(p);
7241 return 0;
7242}
7243
7244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007245if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246
7247 ac_cv_pthread_is_default=yes
7248 ac_cv_kthread=no
7249 ac_cv_pthread=no
7250
7251else
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007256fi
7257
7258
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007259fi
7260
Matthias Kloseb9621712010-04-24 17:59:49 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7262$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263
7264
7265if test $ac_cv_pthread_is_default = yes
7266then
7267 ac_cv_kpthread=no
7268else
7269# -Kpthread, if available, provides the right #defines
7270# and linker options to make pthread_create available
7271# Some compilers won't report that they do not support -Kpthread,
7272# so we need to run a program to see whether it really made the
7273# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7275$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007276if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007277 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278else
7279 ac_save_cc="$CC"
7280CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007281if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007282 ac_cv_kpthread=no
7283else
Matthias Kloseb9621712010-04-24 17:59:49 +00007284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007285/* end confdefs.h. */
7286
Stefan Krah7dba5942012-11-22 22:49:11 +01007287#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288#include <pthread.h>
7289
7290void* routine(void* p){return NULL;}
7291
7292int main(){
7293 pthread_t p;
7294 if(pthread_create(&p,NULL,routine,NULL)!=0)
7295 return 1;
7296 (void)pthread_detach(p);
7297 return 0;
7298}
7299
7300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007301if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302 ac_cv_kpthread=yes
7303else
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007308fi
7309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007310CC="$ac_save_cc"
7311fi
7312
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7314$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315fi
7316
7317if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7318then
7319# -Kthread, if available, provides the right #defines
7320# and linker options to make pthread_create available
7321# Some compilers won't report that they do not support -Kthread,
7322# so we need to run a program to see whether it really made the
7323# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7325$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007326if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007327 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007328else
7329 ac_save_cc="$CC"
7330CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007331if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007332 ac_cv_kthread=no
7333else
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335/* end confdefs.h. */
7336
Stefan Krah7dba5942012-11-22 22:49:11 +01007337#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338#include <pthread.h>
7339
7340void* routine(void* p){return NULL;}
7341
7342int main(){
7343 pthread_t p;
7344 if(pthread_create(&p,NULL,routine,NULL)!=0)
7345 return 1;
7346 (void)pthread_detach(p);
7347 return 0;
7348}
7349
7350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007351if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007352 ac_cv_kthread=yes
7353else
Matthias Kloseb9621712010-04-24 17:59:49 +00007354 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358fi
7359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360CC="$ac_save_cc"
7361fi
7362
Matthias Kloseb9621712010-04-24 17:59:49 +00007363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7364$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365fi
7366
7367if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7368then
7369# -pthread, if available, provides the right #defines
7370# and linker options to make pthread_create available
7371# Some compilers won't report that they do not support -pthread,
7372# so we need to run a program to see whether it really made the
7373# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7375$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007376if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378else
7379 ac_save_cc="$CC"
7380CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007381if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007382 ac_cv_pthread=no
7383else
Matthias Kloseb9621712010-04-24 17:59:49 +00007384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007385/* end confdefs.h. */
7386
Stefan Krah7dba5942012-11-22 22:49:11 +01007387#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388#include <pthread.h>
7389
7390void* routine(void* p){return NULL;}
7391
7392int main(){
7393 pthread_t p;
7394 if(pthread_create(&p,NULL,routine,NULL)!=0)
7395 return 1;
7396 (void)pthread_detach(p);
7397 return 0;
7398}
7399
7400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007401if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402 ac_cv_pthread=yes
7403else
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007408fi
7409
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410CC="$ac_save_cc"
7411fi
7412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7414$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415fi
7416
7417# If we have set a CC compiler flag for thread support then
7418# check if it works for CXX, too.
7419ac_cv_cxx_thread=no
7420if test ! -z "$CXX"
7421then
Matthias Kloseb9621712010-04-24 17:59:49 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7423$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424ac_save_cxx="$CXX"
7425
7426if test "$ac_cv_kpthread" = "yes"
7427then
7428 CXX="$CXX -Kpthread"
7429 ac_cv_cxx_thread=yes
7430elif test "$ac_cv_kthread" = "yes"
7431then
7432 CXX="$CXX -Kthread"
7433 ac_cv_cxx_thread=yes
7434elif test "$ac_cv_pthread" = "yes"
7435then
7436 CXX="$CXX -pthread"
7437 ac_cv_cxx_thread=yes
7438fi
7439
7440if test $ac_cv_cxx_thread = yes
7441then
7442 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7443 $CXX -c conftest.$ac_ext 2>&5
7444 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7445 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7446 then
7447 ac_cv_cxx_thread=yes
7448 else
7449 ac_cv_cxx_thread=no
7450 fi
7451 rm -fr conftest*
7452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7454$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455fi
7456CXX="$ac_save_cxx"
7457
7458
7459# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7461$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007462if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466/* end confdefs.h. */
7467#include <stdlib.h>
7468#include <stdarg.h>
7469#include <string.h>
7470#include <float.h>
7471
7472int
7473main ()
7474{
7475
7476 ;
7477 return 0;
7478}
7479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007480if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007481 ac_cv_header_stdc=yes
7482else
Matthias Kloseb9621712010-04-24 17:59:49 +00007483 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7486
7487if test $ac_cv_header_stdc = yes; then
7488 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490/* end confdefs.h. */
7491#include <string.h>
7492
7493_ACEOF
7494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 $EGREP "memchr" >/dev/null 2>&1; then :
7496
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497else
7498 ac_cv_header_stdc=no
7499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007500rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501
7502fi
7503
7504if test $ac_cv_header_stdc = yes; then
7505 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507/* end confdefs.h. */
7508#include <stdlib.h>
7509
7510_ACEOF
7511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007512 $EGREP "free" >/dev/null 2>&1; then :
7513
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514else
7515 ac_cv_header_stdc=no
7516fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007517rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518
7519fi
7520
7521if test $ac_cv_header_stdc = yes; then
7522 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007523 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524 :
7525else
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527/* end confdefs.h. */
7528#include <ctype.h>
7529#include <stdlib.h>
7530#if ((' ' & 0x0FF) == 0x020)
7531# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7532# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7533#else
7534# define ISLOWER(c) \
7535 (('a' <= (c) && (c) <= 'i') \
7536 || ('j' <= (c) && (c) <= 'r') \
7537 || ('s' <= (c) && (c) <= 'z'))
7538# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7539#endif
7540
7541#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7542int
7543main ()
7544{
7545 int i;
7546 for (i = 0; i < 256; i++)
7547 if (XOR (islower (i), ISLOWER (i))
7548 || toupper (i) != TOUPPER (i))
7549 return 2;
7550 return 0;
7551}
7552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007553if ac_fn_c_try_run "$LINENO"; then :
7554
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555else
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560fi
7561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562fi
7563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7565$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566if test $ac_cv_header_stdc = yes; then
7567
Matthias Kloseb9621712010-04-24 17:59:49 +00007568$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569
7570fi
7571
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007572for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007573fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007574ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007575sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007576unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007577poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007578sys/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 +01007579sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007580sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007581sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007582sys/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 -07007583libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007584bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007585sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007586do :
7587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7588ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007589if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007591#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007592_ACEOF
7593
7594fi
7595
Guido van Rossum627b2d71993-12-24 10:39:16 +00007596done
7597
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007598ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007599for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7602$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007603if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007605else
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007607/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007608#include <sys/types.h>
7609#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007610
Martin v. Löwis11437992002-04-12 09:54:03 +00007611int
7612main ()
7613{
7614if ((DIR *) 0)
7615return 0;
7616 ;
7617 return 0;
7618}
7619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007622else
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007627eval ac_res=\$$as_ac_Header
7628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7629$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007630if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007631 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007632#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007633_ACEOF
7634
7635ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007636fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007637
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007638done
7639# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7640if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7642$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007643if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007645else
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007650/* Override any GCC internal prototype to avoid an error.
7651 Use char because int might match the return type of a GCC
7652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007653#ifdef __cplusplus
7654extern "C"
7655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007656char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007657int
7658main ()
7659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007661 ;
7662 return 0;
7663}
7664_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665for ac_lib in '' dir; do
7666 if test -z "$ac_lib"; then
7667 ac_res="none required"
7668 else
7669 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007670 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007675rm -f core conftest.err conftest.$ac_objext \
7676 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007677 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680done
Victor Stinnere0be4232011-10-25 13:06:09 +02007681if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007683else
7684 ac_cv_search_opendir=no
7685fi
7686rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007687LIBS=$ac_func_search_save_LIBS
7688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7690$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007692if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007694
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007695fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007696
Michael W. Hudson54241132001-12-07 15:38:26 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7699$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007700if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007702else
7703 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707/* Override any GCC internal prototype to avoid an error.
7708 Use char because int might match the return type of a GCC
7709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007710#ifdef __cplusplus
7711extern "C"
7712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007713char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007714int
7715main ()
7716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ;
7719 return 0;
7720}
7721_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722for ac_lib in '' x; do
7723 if test -z "$ac_lib"; then
7724 ac_res="none required"
7725 else
7726 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007727 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732rm -f core conftest.err conftest.$ac_objext \
7733 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007734 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737done
Victor Stinnere0be4232011-10-25 13:06:09 +02007738if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007740else
7741 ac_cv_search_opendir=no
7742fi
7743rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007744LIBS=$ac_func_search_save_LIBS
7745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7747$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007749if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007752fi
7753
7754fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007755
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7757$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007758if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007762/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007763#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007764int
7765main ()
7766{
7767return makedev(0, 0);
7768 ;
7769 return 0;
7770}
7771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007772if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007773 ac_cv_header_sys_types_h_makedev=yes
7774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007777rm -f core conftest.err conftest.$ac_objext \
7778 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007779
7780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7782$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007783
7784if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007785ac_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 +02007786if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007787
Matthias Kloseb9621712010-04-24 17:59:49 +00007788$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007789
7790fi
7791
7792
7793
7794 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 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 +02007796if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007797
Matthias Kloseb9621712010-04-24 17:59:49 +00007798$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007799
7800fi
7801
7802
7803 fi
7804fi
7805
Michael W. Hudson54241132001-12-07 15:38:26 +00007806
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007807# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7808for ac_header in net/if.h
7809do :
7810 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7811#ifdef STDC_HEADERS
7812# include <stdlib.h>
7813# include <stddef.h>
7814#else
7815# ifdef HAVE_STDLIB_H
7816# include <stdlib.h>
7817# endif
7818#endif
7819#ifdef HAVE_SYS_SOCKET_H
7820# include <sys/socket.h>
7821#endif
7822
7823"
Victor Stinnere0be4232011-10-25 13:06:09 +02007824if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007825 cat >>confdefs.h <<_ACEOF
7826#define HAVE_NET_IF_H 1
7827_ACEOF
7828
7829fi
7830
7831done
7832
7833
Martin v. Löwis11017b12006-01-14 18:12:57 +00007834# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007835for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007836do :
7837 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 +00007838#ifdef HAVE_ASM_TYPES_H
7839#include <asm/types.h>
7840#endif
7841#ifdef HAVE_SYS_SOCKET_H
7842#include <sys/socket.h>
7843#endif
7844
Matthias Kloseb9621712010-04-24 17:59:49 +00007845"
Victor Stinnere0be4232011-10-25 13:06:09 +02007846if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007847 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007848#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007849_ACEOF
7850
7851fi
7852
7853done
7854
7855
Charles-François Natali47413c12011-10-06 19:47:44 +02007856# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007857for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007858do :
7859 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7860ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7861#ifdef HAVE_SYS_SOCKET_H
7862#include <sys/socket.h>
7863#endif
7864
7865"
7866if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7867 cat >>confdefs.h <<_ACEOF
7868#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7869_ACEOF
7870
7871fi
7872
7873done
7874
7875
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007877was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7879$as_echo_n "checking for clock_t in time.h... " >&6; }
7880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007881/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007882#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007883
7884_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007887 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007888else
Martin v. Löwis11437992002-04-12 09:54:03 +00007889
7890
Matthias Kloseb9621712010-04-24 17:59:49 +00007891$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007892
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007893
Guido van Rossum627b2d71993-12-24 10:39:16 +00007894fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007895rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7898$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007899
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7901$as_echo_n "checking for makedev... " >&6; }
7902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007903/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007904
Jesus Cea740f53a2010-04-28 11:35:30 +00007905#if defined(MAJOR_IN_MKDEV)
7906#include <sys/mkdev.h>
7907#elif defined(MAJOR_IN_SYSMACROS)
7908#include <sys/sysmacros.h>
7909#else
7910#include <sys/types.h>
7911#endif
7912
Neal Norwitz11690112002-07-30 01:08:28 +00007913int
7914main ()
7915{
Jesus Cea740f53a2010-04-28 11:35:30 +00007916
7917 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007918 ;
7919 return 0;
7920}
Matthias Kloseb159a552010-04-25 21:00:44 +00007921
Neal Norwitz11690112002-07-30 01:08:28 +00007922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007923if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007924 ac_cv_has_makedev=yes
7925else
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928rm -f core conftest.err conftest.$ac_objext \
7929 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7931$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007932if test "$ac_cv_has_makedev" = "yes"; then
7933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007935
7936fi
7937
Christian Heimes985ecdc2013-11-20 11:46:18 +01007938# byte swapping
7939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7940$as_echo_n "checking for le64toh... " >&6; }
7941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7942/* end confdefs.h. */
7943
7944#ifdef HAVE_ENDIAN_H
7945#include <endian.h>
7946#elif defined(HAVE_SYS_ENDIAN_H)
7947#include <sys/endian.h>
7948#endif
7949
7950int
7951main ()
7952{
7953
7954 le64toh(1)
7955 ;
7956 return 0;
7957}
7958
7959_ACEOF
7960if ac_fn_c_try_link "$LINENO"; then :
7961 ac_cv_has_le64toh=yes
7962else
7963 ac_cv_has_le64toh=no
7964fi
7965rm -f core conftest.err conftest.$ac_objext \
7966 conftest$ac_exeext conftest.$ac_ext
7967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7968$as_echo "$ac_cv_has_le64toh" >&6; }
7969if test "$ac_cv_has_le64toh" = "yes"; then
7970
7971$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7972
7973fi
7974
Martin v. Löwis399a6892002-10-04 10:22:02 +00007975# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7976# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7977# defined, but the compiler does not support pragma redefine_extname,
7978# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7979# structures (such as rlimit64) without declaring them. As a
7980# work-around, disable LFS on such configurations
7981
7982use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7984$as_echo_n "checking Solaris LFS bug... " >&6; }
7985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007986/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007987
7988#define _LARGEFILE_SOURCE 1
7989#define _FILE_OFFSET_BITS 64
7990#include <sys/resource.h>
7991
Martin v. Löwis399a6892002-10-04 10:22:02 +00007992int
7993main ()
7994{
7995struct rlimit foo;
7996 ;
7997 return 0;
7998}
7999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008001 sol_lfs_bug=no
8002else
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8007$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008008if test "$sol_lfs_bug" = "yes"; then
8009 use_lfs=no
8010fi
8011
8012if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008013# Two defines needed to enable largefile support on various platforms
8014# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008015case $ac_sys_system/$ac_sys_release in
8016AIX*)
8017
8018$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8019
8020 ;;
8021esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008022
Matthias Kloseb9621712010-04-24 17:59:49 +00008023$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
8025
Matthias Kloseb9621712010-04-24 17:59:49 +00008026$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008027
Martin v. Löwis399a6892002-10-04 10:22:02 +00008028fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008029
Guido van Rossum84e7b241996-08-19 21:59:00 +00008030# Add some code to confdefs.h so that the test for off_t works on SCO
8031cat >> confdefs.h <<\EOF
8032#if defined(SCO_DS)
8033#undef _OFF_T
8034#endif
8035EOF
8036
Guido van Rossumef2255b2000-03-10 22:30:29 +00008037# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008038ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008039if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008041else
Martin v. Löwis11437992002-04-12 09:54:03 +00008042
8043cat >>confdefs.h <<_ACEOF
8044#define mode_t int
8045_ACEOF
8046
8047fi
8048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008050if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008052else
Martin v. Löwis11437992002-04-12 09:54:03 +00008053
8054cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008056_ACEOF
8057
8058fi
8059
Matthias Kloseb9621712010-04-24 17:59:49 +00008060ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008061if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008062
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008063else
Martin v. Löwis11437992002-04-12 09:54:03 +00008064
8065cat >>confdefs.h <<_ACEOF
8066#define pid_t int
8067_ACEOF
8068
8069fi
8070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008071
Martin v. Löwis11437992002-04-12 09:54:03 +00008072cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008073#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008074_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008077if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008079else
Martin v. Löwis11437992002-04-12 09:54:03 +00008080
8081cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008083_ACEOF
8084
8085fi
8086
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8088$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008089if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008091else
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008093/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008094#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
8096_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008099 ac_cv_type_uid_t=yes
8100else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008101 ac_cv_type_uid_t=no
8102fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008103rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8107$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008108if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008109
Matthias Kloseb9621712010-04-24 17:59:49 +00008110$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008111
8112
Matthias Kloseb9621712010-04-24 17:59:49 +00008113$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114
8115fi
8116
Mark Dickinson983bc162012-12-02 12:11:38 +00008117
8118# There are two separate checks for each of the exact-width integer types we
8119# need. First we check whether the type is available using the usual
8120# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8121# and <stdint.h> where available). We then also use the special type checks of
8122# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8123# directly, #define's uint32_t to be a suitable type.
8124
8125ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8126if test "x$ac_cv_type_uint32_t" = xyes; then :
8127
8128$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8129
8130fi
8131
Matthias Kloseb9621712010-04-24 17:59:49 +00008132ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8133case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008134 no|yes) ;; #(
8135 *)
8136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008138
8139
8140cat >>confdefs.h <<_ACEOF
8141#define uint32_t $ac_cv_c_uint32_t
8142_ACEOF
8143;;
8144 esac
8145
Mark Dickinson983bc162012-12-02 12:11:38 +00008146
8147ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8148if test "x$ac_cv_type_uint64_t" = xyes; then :
8149
8150$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8151
8152fi
8153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8155case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008156 no|yes) ;; #(
8157 *)
8158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008160
8161
8162cat >>confdefs.h <<_ACEOF
8163#define uint64_t $ac_cv_c_uint64_t
8164_ACEOF
8165;;
8166 esac
8167
Mark Dickinson983bc162012-12-02 12:11:38 +00008168
8169ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8170if test "x$ac_cv_type_int32_t" = xyes; then :
8171
8172$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8173
8174fi
8175
Matthias Kloseb9621712010-04-24 17:59:49 +00008176ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8177case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008178 no|yes) ;; #(
8179 *)
8180
8181cat >>confdefs.h <<_ACEOF
8182#define int32_t $ac_cv_c_int32_t
8183_ACEOF
8184;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008185esac
8186
Mark Dickinson983bc162012-12-02 12:11:38 +00008187
8188ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8189if test "x$ac_cv_type_int64_t" = xyes; then :
8190
8191$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8192
8193fi
8194
Matthias Kloseb9621712010-04-24 17:59:49 +00008195ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8196case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008197 no|yes) ;; #(
8198 *)
8199
8200cat >>confdefs.h <<_ACEOF
8201#define int64_t $ac_cv_c_int64_t
8202_ACEOF
8203;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008204esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008205
Mark Dickinson983bc162012-12-02 12:11:38 +00008206
Matthias Kloseb9621712010-04-24 17:59:49 +00008207ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008208if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209
Matthias Kloseb9621712010-04-24 17:59:49 +00008210$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008211
8212fi
8213
Stefan Krah1919b7e2012-03-21 18:25:23 +01008214ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8215if test "x$ac_cv_type___uint128_t" = xyes; then :
8216
8217$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8218
8219fi
8220
Jack Jansendd19cf82001-12-06 22:36:17 +00008221
Michael W. Hudson54241132001-12-07 15:38:26 +00008222# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008223# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224# The cast to long int works around a bug in the HP C Compiler
8225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8227# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8229$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008230if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008232else
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 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 +00008234
Martin v. Löwis11437992002-04-12 09:54:03 +00008235else
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 if test "$ac_cv_type_int" = yes; then
8237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008239as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008240See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241 else
8242 ac_cv_sizeof_int=0
8243 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8248$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249
8250
8251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008253#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008254_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008255
8256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257# The cast to long int works around a bug in the HP C Compiler
8258# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8259# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8260# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8262$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008263if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008265else
Matthias Kloseb9621712010-04-24 17:59:49 +00008266 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 +00008267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268else
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 if test "$ac_cv_type_long" = yes; then
8270 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008272as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008273See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 else
8275 ac_cv_sizeof_long=0
8276 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8281$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282
8283
8284
Martin v. Löwis11437992002-04-12 09:54:03 +00008285cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008286#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008287_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008288
8289
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290# The cast to long int works around a bug in the HP C Compiler
8291# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8292# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8293# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8295$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008296if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008298else
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 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 +00008300
Martin v. Löwis11437992002-04-12 09:54:03 +00008301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 if test "$ac_cv_type_void_p" = yes; then
8303 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8304$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008305as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008306See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307 else
8308 ac_cv_sizeof_void_p=0
8309 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8314$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008315
8316
8317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008319#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008320_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008321
8322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323# The cast to long int works around a bug in the HP C Compiler
8324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8326# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8328$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008329if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008331else
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 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 +00008333
Martin v. Löwis11437992002-04-12 09:54:03 +00008334else
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 if test "$ac_cv_type_short" = yes; then
8336 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008338as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008339See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008340 else
8341 ac_cv_sizeof_short=0
8342 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008344
Martin v. Löwis11437992002-04-12 09:54:03 +00008345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8347$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008348
8349
8350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008352#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008353_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008354
8355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356# The cast to long int works around a bug in the HP C Compiler
8357# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8358# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8359# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8361$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008362if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008364else
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 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 +00008366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367else
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 if test "$ac_cv_type_float" = yes; then
8369 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8370$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008371as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008372See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008373 else
8374 ac_cv_sizeof_float=0
8375 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008377
Martin v. Löwis11437992002-04-12 09:54:03 +00008378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8380$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381
8382
8383
Martin v. Löwis11437992002-04-12 09:54:03 +00008384cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008385#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008386_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008387
8388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389# The cast to long int works around a bug in the HP C Compiler
8390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8392# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8394$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008395if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008397else
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 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 +00008399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 if test "$ac_cv_type_double" = yes; then
8402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008404as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008405See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406 else
8407 ac_cv_sizeof_double=0
8408 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8413$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414
8415
8416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008418#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008419_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008420
8421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422# The cast to long int works around a bug in the HP C Compiler
8423# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8424# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8425# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8427$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008428if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008430else
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 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 +00008432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433else
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 if test "$ac_cv_type_fpos_t" = yes; then
8435 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8436$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008437as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008438See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439 else
8440 ac_cv_sizeof_fpos_t=0
8441 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008443
Martin v. Löwis11437992002-04-12 09:54:03 +00008444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8446$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447
8448
8449
Martin v. Löwis11437992002-04-12 09:54:03 +00008450cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008451#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008452_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008453
Michael W. Hudson54241132001-12-07 15:38:26 +00008454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455# The cast to long int works around a bug in the HP C Compiler
8456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8458# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8460$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008461if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008463else
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 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 +00008465
Martin v. Löwis18e16552006-02-15 17:27:45 +00008466else
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 if test "$ac_cv_type_size_t" = yes; then
8468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008470as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008471See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472 else
8473 ac_cv_sizeof_size_t=0
8474 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476
Martin v. Löwis18e16552006-02-15 17:27:45 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8479$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480
8481
8482
Martin v. Löwis18e16552006-02-15 17:27:45 +00008483cat >>confdefs.h <<_ACEOF
8484#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8485_ACEOF
8486
8487
Christian Heimes400adb02008-02-01 08:12:03 +00008488# The cast to long int works around a bug in the HP C Compiler
8489# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8490# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8491# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8493$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008494if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008496else
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 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 +00008498
Christian Heimes400adb02008-02-01 08:12:03 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 if test "$ac_cv_type_pid_t" = yes; then
8501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008503as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008504See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008505 else
8506 ac_cv_sizeof_pid_t=0
8507 fi
8508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509
Christian Heimes400adb02008-02-01 08:12:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8512$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008513
8514
8515
8516cat >>confdefs.h <<_ACEOF
8517#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8518_ACEOF
8519
8520
Michael W. Hudson54241132001-12-07 15:38:26 +00008521
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8523$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008524have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008526/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008527
Martin v. Löwis11437992002-04-12 09:54:03 +00008528int
8529main ()
8530{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008531long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008532 ;
8533 return 0;
8534}
8535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008536if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008537
8538
Matthias Kloseb9621712010-04-24 17:59:49 +00008539$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008541 have_long_long=yes
8542
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8546$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008547if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548# The cast to long int works around a bug in the HP C Compiler
8549# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8550# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8551# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8553$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008554if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008556else
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 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 +00008558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559else
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 if test "$ac_cv_type_long_long" = yes; then
8561 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008563as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008564See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565 else
8566 ac_cv_sizeof_long_long=0
8567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8572$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573
8574
8575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008577#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008578_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008579
Michael W. Hudson54241132001-12-07 15:38:26 +00008580
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008581fi
8582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8584$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008585have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008587/* end confdefs.h. */
8588
8589int
8590main ()
8591{
8592long double x; x = (long double)0;
8593 ;
8594 return 0;
8595}
8596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008597if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008598
8599
Matthias Kloseb9621712010-04-24 17:59:49 +00008600$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008601
8602 have_long_double=yes
8603
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008604fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8607$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008608if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008609# The cast to long int works around a bug in the HP C Compiler
8610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8612# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8614$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008615if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008617else
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 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 +00008619
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 if test "$ac_cv_type_long_double" = yes; then
8622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008624as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008625See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008626 else
8627 ac_cv_sizeof_long_double=0
8628 fi
8629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8633$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008634
8635
8636
8637cat >>confdefs.h <<_ACEOF
8638#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8639_ACEOF
8640
8641
8642fi
8643
8644
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8646$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008647have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008649/* end confdefs.h. */
8650
8651int
8652main ()
8653{
8654_Bool x; x = (_Bool)0;
8655 ;
8656 return 0;
8657}
8658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008659if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008660
8661
Matthias Kloseb9621712010-04-24 17:59:49 +00008662$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008663
8664 have_c99_bool=yes
8665
Thomas Woutersb2137042007-02-01 18:02:27 +00008666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8669$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008670if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671# The cast to long int works around a bug in the HP C Compiler
8672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8674# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8676$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008677if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008679else
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 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 +00008681
Thomas Woutersb2137042007-02-01 18:02:27 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 if test "$ac_cv_type__Bool" = yes; then
8684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008686as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008687See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688 else
8689 ac_cv_sizeof__Bool=0
8690 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692
Thomas Woutersb2137042007-02-01 18:02:27 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8695$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696
8697
8698
Thomas Woutersb2137042007-02-01 18:02:27 +00008699cat >>confdefs.h <<_ACEOF
8700#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8701_ACEOF
8702
8703
8704fi
8705
Matthias Kloseb9621712010-04-24 17:59:49 +00008706ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008707 #include <stdint.h>
8708 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008709 #ifdef HAVE_INTTYPES_H
8710 #include <inttypes.h>
8711 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008712"
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008714
8715cat >>confdefs.h <<_ACEOF
8716#define HAVE_UINTPTR_T 1
8717_ACEOF
8718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719# The cast to long int works around a bug in the HP C Compiler
8720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8724$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008725if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 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 +00008729
Martin v. Löwis11437992002-04-12 09:54:03 +00008730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 if test "$ac_cv_type_uintptr_t" = yes; then
8732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008734as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008735See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736 else
8737 ac_cv_sizeof_uintptr_t=0
8738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740
Martin v. Löwis11437992002-04-12 09:54:03 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8743$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744
8745
8746
Martin v. Löwis11437992002-04-12 09:54:03 +00008747cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008748#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008749_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008750
Michael W. Hudson54241132001-12-07 15:38:26 +00008751
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008752fi
8753
Thomas Wouters89f507f2006-12-13 04:49:30 +00008754
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008755# The cast to long int works around a bug in the HP C Compiler
8756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8758# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8760$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008761if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008763else
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008765#ifdef HAVE_SYS_TYPES_H
8766#include <sys/types.h>
8767#endif
8768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008770
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 if test "$ac_cv_type_off_t" = yes; then
8773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008775as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008776See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008777 else
8778 ac_cv_sizeof_off_t=0
8779 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8784$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008785
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008786
8787
Martin v. Löwis11437992002-04-12 09:54:03 +00008788cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008789#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008790_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008791
Michael W. Hudson54241132001-12-07 15:38:26 +00008792
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008793
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8795$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008796if test "$have_long_long" = yes
8797then
8798if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008799 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008802
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8804$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008805else
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8807$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008808fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008809else
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8811$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008812fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008813
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008814# The cast to long int works around a bug in the HP C Compiler
8815# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8816# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8817# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8819$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008820if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008822else
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008824#ifdef HAVE_SYS_TYPES_H
8825#include <sys/types.h>
8826#endif
8827#ifdef HAVE_TIME_H
8828#include <time.h>
8829#endif
8830
Matthias Kloseb9621712010-04-24 17:59:49 +00008831"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008833else
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 if test "$ac_cv_type_time_t" = yes; then
8835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008837as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008838See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839 else
8840 ac_cv_sizeof_time_t=0
8841 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8846$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848
8849
Martin v. Löwis11437992002-04-12 09:54:03 +00008850cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008851#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008852_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008853
Michael W. Hudson54241132001-12-07 15:38:26 +00008854
8855
Trent Mick635f6fb2000-08-23 21:33:05 +00008856# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008857ac_save_cc="$CC"
8858if test "$ac_cv_kpthread" = "yes"
8859then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008860elif test "$ac_cv_kthread" = "yes"
8861then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008862elif test "$ac_cv_pthread" = "yes"
8863then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008864fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8867$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008868have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008870/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008871
8872 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
8875{
Guido van Rossum12580492000-09-24 16:47:19 +00008876pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 ;
8878 return 0;
8879}
Matthias Kloseb159a552010-04-25 21:00:44 +00008880
Martin v. Löwis11437992002-04-12 09:54:03 +00008881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008882if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008883 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8887$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008888if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8892# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8894$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008895if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008896 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008897else
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008899#ifdef HAVE_PTHREAD_H
8900#include <pthread.h>
8901#endif
8902
Matthias Kloseb9621712010-04-24 17:59:49 +00008903"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008905else
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 if test "$ac_cv_type_pthread_t" = yes; then
8907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008909as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008910See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911 else
8912 ac_cv_sizeof_pthread_t=0
8913 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008915
Trent Mick635f6fb2000-08-23 21:33:05 +00008916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8918$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008919
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008920
8921
Martin v. Löwis11437992002-04-12 09:54:03 +00008922cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008923#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008924_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008925
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926
Trent Mick635f6fb2000-08-23 21:33:05 +00008927fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008928CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008929
Michael W. Hudson54241132001-12-07 15:38:26 +00008930
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008931case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008932 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008933 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8934 ;;
8935 Darwin/*)
8936 OTHER_LIBTOOL_OPT=""
8937 ;;
8938esac
8939
8940
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008941
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008942case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008943 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008944 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8945 if test "${enable_universalsdk}"; then
8946 :
8947 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008948 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008949 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008950 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008951 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008952 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008953 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008954 if test ${gcc_version} '<' 4.0
8955 then
8956 LIBTOOL_CRUFT="-lcc_dynamic"
8957 else
8958 LIBTOOL_CRUFT=""
8959 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008961 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008962else
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008964/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008965
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008966 #include <unistd.h>
8967 int main(int argc, char*argv[])
8968 {
8969 if (sizeof(long) == 4) {
8970 return 0;
8971 } else {
8972 return 1;
8973 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008974 }
8975
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008977if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008978 ac_osx_32bit=yes
8979else
Matthias Kloseb9621712010-04-24 17:59:49 +00008980 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8983 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008984fi
8985
8986
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008987 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008988 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008989 i386)
8990 MACOSX_DEFAULT_ARCH="i386"
8991 ;;
8992 ppc)
8993 MACOSX_DEFAULT_ARCH="ppc"
8994 ;;
8995 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008996 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997 ;;
8998 esac
8999 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009000 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009001 i386)
9002 MACOSX_DEFAULT_ARCH="x86_64"
9003 ;;
9004 ppc)
9005 MACOSX_DEFAULT_ARCH="ppc64"
9006 ;;
9007 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009008 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009009 ;;
9010 esac
9011
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009012 fi
9013
9014 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009015 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009016 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009017esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9019$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009020if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009021then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009022 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009024 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009025
Matthias Kloseb9621712010-04-24 17:59:49 +00009026$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009027
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9029$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009030 if test $enable_shared = "yes"
9031 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009032 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 +00009033 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9036$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009037fi
9038
Matthias Kloseb9621712010-04-24 17:59:49 +00009039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9040$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009041case $ac_sys_system/$ac_sys_release in
9042 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009045
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9047$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009048 ;;
9049 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9051$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009052 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009053esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009054
Guido van Rossum0a516c91994-09-12 10:58:40 +00009055# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009056
Michael W. Hudson54241132001-12-07 15:38:26 +00009057
9058
9059
9060
Benjamin Peterson99f03762010-04-11 22:15:28 +00009061
Thomas Wouters477c8d52006-05-27 19:21:47 +00009062
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009063# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9064# -- usually .so, .sl on HP-UX, .dll on Cygwin
9065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9066$as_echo_n "checking the extension of shared libraries... " >&6; }
9067if test -z "$SHLIB_SUFFIX"; then
9068 case $ac_sys_system in
9069 hp*|HP*)
9070 case `uname -m` in
9071 ia64) SHLIB_SUFFIX=.so;;
9072 *) SHLIB_SUFFIX=.sl;;
9073 esac
9074 ;;
9075 CYGWIN*) SHLIB_SUFFIX=.dll;;
9076 *) SHLIB_SUFFIX=.so;;
9077 esac
9078fi
9079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9080$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009081
Guido van Rossum0a516c91994-09-12 10:58:40 +00009082# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009083# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009084# (Shared libraries in this instance are shared modules to be loaded into
9085# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9087$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009088if test -z "$LDSHARED"
9089then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009090 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009091 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009092 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009093 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009094 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009095 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009096 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009098 if test "$GCC" = "yes" ; then
9099 LDSHARED='$(CC) -shared'
9100 LDCXXSHARED='$(CXX) -shared'
9101 else
9102 LDSHARED='$(CC) -G'
9103 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009104 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009105 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009106 if test "$GCC" = "yes" ; then
9107 LDSHARED='$(CC) -shared'
9108 LDCXXSHARED='$(CXX) -shared'
9109 else
9110 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009111 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009112 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009113 LDSHARED='$(CC) -bundle'
9114 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +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 Jansena3891ea2001-09-07 14:25:12 +00009120 else
9121 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009122 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009123 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009124 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009125 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009126 LDSHARED='$(CC) -bundle'
9127 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009128 if test "$enable_framework" ; then
9129 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009130 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9131 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009132 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009133 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009134 # No framework, use the Python app as bundle-loader
9135 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009136 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009137 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009138 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009139 Darwin/*)
9140 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9141 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009142
Ned Deily36820b62014-06-25 13:44:22 -07009143 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9144 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9145 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9146 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9147 if test ${dep_target_major} -eq 10 && \
9148 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009149 then
Ned Deily36820b62014-06-25 13:44:22 -07009150 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009151 LDSHARED='$(CC) -bundle'
9152 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009153 if test "$enable_framework" ; then
9154 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009155 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9156 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009157 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009158 else
9159 # No framework, use the Python app as bundle-loader
9160 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9161 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009163 fi
Ned Deily36820b62014-06-25 13:44:22 -07009164 else
9165 # building for OS X 10.3 and later
9166 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9167 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9168 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009169 fi
9170 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009171 Linux*|GNU*|QNX*)
9172 LDSHARED='$(CC) -shared'
9173 LDCXXSHARED='$(CXX) -shared';;
9174 BSD/OS*/4*)
9175 LDSHARED="gcc -shared"
9176 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009177 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009178 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009179 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009180 LDSHARED='$(CC) -shared'
9181 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009182 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009183 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009184 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009185 OpenBSD*)
9186 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9187 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009188 LDSHARED='$(CC) -shared $(CCSHARED)'
9189 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009190 else
9191 case `uname -r` in
9192 [01].* | 2.[0-7] | 2.[0-7].*)
9193 LDSHARED="ld -Bshareable ${LDFLAGS}"
9194 ;;
9195 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009196 LDSHARED='$(CC) -shared $(CCSHARED)'
9197 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009198 ;;
9199 esac
9200 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009201 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009202 LDSHARED='$(CC) -shared'
9203 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009204 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009205 if test "$GCC" = "yes" ; then
9206 LDSHARED='$(CC) -shared'
9207 LDCXXSHARED='$(CXX) -shared'
9208 else
9209 LDSHARED='$(CC) -G'
9210 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009211 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009212 SCO_SV*)
9213 LDSHARED='$(CC) -Wl,-G,-Bexport'
9214 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9215 CYGWIN*)
9216 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9217 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009218 *) LDSHARED="ld";;
9219 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9222$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009223LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009224BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009225# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009226# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9228$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009229if test -z "$CCSHARED"
9230then
Guido van Rossum07397971997-04-29 21:49:50 +00009231 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009232 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009233 then CCSHARED="-fPIC";
9234 elif test `uname -p` = sparc;
9235 then CCSHARED="-xcode=pic32";
9236 else CCSHARED="-Kpic";
9237 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009238 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009239 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009240 else CCSHARED="+z";
9241 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009242 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009243 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009244 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009245 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009246 if test "$GCC" = "yes"
9247 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009248 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009249 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009250 SCO_SV*)
9251 if test "$GCC" = "yes"
9252 then CCSHARED="-fPIC"
9253 else CCSHARED="-Kpic -belf"
9254 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009255 IRIX*/6*) case $CC in
9256 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009257 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009258 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009259 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9262$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009263# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009264# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9266$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009267if test -z "$LINKFORSHARED"
9268then
Guido van Rossum07397971997-04-29 21:49:50 +00009269 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009270 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009271 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009272 LINKFORSHARED="-Wl,-E -Wl,+s";;
9273# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009274 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009275 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009276 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009278 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009279
9280 # Issue #18075: the default maximum stack size (8MBytes) is too
9281 # small for the default recursion limit. Increase the stack size
9282 # to ensure that tests don't crash
9283 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9284
Jack Jansene578a632001-08-15 01:27:14 +00009285 if test "$enable_framework"
9286 then
Jack Jansenda49e192005-01-07 13:08:22 +00009287 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009288 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009289 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009290 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009291 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009292 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009293 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009294 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9295 then
9296 LINKFORSHARED="-Wl,--export-dynamic"
9297 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009298 SunOS/5*) case $CC in
9299 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009300 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009301 then
9302 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009303 fi;;
9304 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009305 CYGWIN*)
9306 if test $enable_shared = "no"
9307 then
9308 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9309 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009310 QNX*)
9311 # -Wl,-E causes the symbols to be added to the dynamic
9312 # symbol table so that they can be found when a module
9313 # is loaded. -N 2048K causes the stack size to be set
9314 # to 2048 kilobytes so that the stack doesn't overflow
9315 # when running test_compile.py.
9316 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9320$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321
Michael W. Hudson54241132001-12-07 15:38:26 +00009322
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009323
Matthias Kloseb9621712010-04-24 17:59:49 +00009324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9325$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009326if test ! "$LIBRARY" = "$LDLIBRARY"
9327then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009328 case $ac_sys_system in
9329 CYGWIN*)
9330 # Cygwin needs CCSHARED when building extension DLLs
9331 # but not when building the interpreter DLL.
9332 CFLAGSFORSHARED='';;
9333 *)
9334 CFLAGSFORSHARED='$(CCSHARED)'
9335 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9338$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009339
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009340# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9341# library (with --enable-shared).
9342# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009343# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9344# if it is not required, since it creates a dependency of the shared library
9345# to LIBS. This, in turn, means that applications linking the shared libpython
9346# don't need to link LIBS explicitly. The default should be only changed
9347# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9350$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009351case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009352 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009353 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009354esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9356$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009357
9358
Guido van Rossum627b2d71993-12-24 10:39:16 +00009359# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9361$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009362if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009363 $as_echo_n "(cached) " >&6
9364else
9365 ac_check_lib_save_LIBS=$LIBS
9366LIBS="-lsendfile $LIBS"
9367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9368/* end confdefs.h. */
9369
9370/* Override any GCC internal prototype to avoid an error.
9371 Use char because int might match the return type of a GCC
9372 builtin and then its argument prototype would still apply. */
9373#ifdef __cplusplus
9374extern "C"
9375#endif
9376char sendfile ();
9377int
9378main ()
9379{
9380return sendfile ();
9381 ;
9382 return 0;
9383}
9384_ACEOF
9385if ac_fn_c_try_link "$LINENO"; then :
9386 ac_cv_lib_sendfile_sendfile=yes
9387else
9388 ac_cv_lib_sendfile_sendfile=no
9389fi
9390rm -f core conftest.err conftest.$ac_objext \
9391 conftest$ac_exeext conftest.$ac_ext
9392LIBS=$ac_check_lib_save_LIBS
9393fi
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9395$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009396if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009397 cat >>confdefs.h <<_ACEOF
9398#define HAVE_LIBSENDFILE 1
9399_ACEOF
9400
9401 LIBS="-lsendfile $LIBS"
9402
9403fi
9404
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9406$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009407if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009408 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009409else
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009411LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415/* Override any GCC internal prototype to avoid an error.
9416 Use char because int might match the return type of a GCC
9417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009418#ifdef __cplusplus
9419extern "C"
9420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009421char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009422int
9423main ()
9424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 ;
9427 return 0;
9428}
9429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432else
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009435rm -f core conftest.err conftest.$ac_objext \
9436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009437LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9440$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009441if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 cat >>confdefs.h <<_ACEOF
9443#define HAVE_LIBDL 1
9444_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009445
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009446 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009447
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009448fi
9449 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9451$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009452if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009453 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009454else
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009456LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460/* Override any GCC internal prototype to avoid an error.
9461 Use char because int might match the return type of a GCC
9462 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463#ifdef __cplusplus
9464extern "C"
9465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009466char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009467int
9468main ()
9469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 ;
9472 return 0;
9473}
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009477else
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009480rm -f core conftest.err conftest.$ac_objext \
9481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009482LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9485$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009486if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 cat >>confdefs.h <<_ACEOF
9488#define HAVE_LIBDLD 1
9489_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009490
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009491 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009492
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009493fi
9494 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009495
Georg Brandlb1441c72009-01-03 22:33:39 +00009496# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009497if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9499$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009500if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009502else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009503 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009507/* Override any GCC internal prototype to avoid an error.
9508 Use char because int might match the return type of a GCC
9509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009510#ifdef __cplusplus
9511extern "C"
9512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009513char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514int
9515main ()
9516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ;
9519 return 0;
9520}
9521_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522for ac_lib in '' pthread rt posix4; do
9523 if test -z "$ac_lib"; then
9524 ac_res="none required"
9525 else
9526 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009527 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009529 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009532rm -f core conftest.err conftest.$ac_objext \
9533 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009534 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537done
Victor Stinnere0be4232011-10-25 13:06:09 +02009538if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540else
9541 ac_cv_search_sem_init=no
9542fi
9543rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009544LIBS=$ac_func_search_save_LIBS
9545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9547$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009549if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009551
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009552fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009553 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009554 # posix4 on Solaris 2.6
9555 # pthread (first!) on Linux
9556fi
9557
Martin v. Löwis19d17342003-06-14 21:03:05 +00009558# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9560$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009561if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009562 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009563else
9564 ac_check_lib_save_LIBS=$LIBS
9565LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009567/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569/* Override any GCC internal prototype to avoid an error.
9570 Use char because int might match the return type of a GCC
9571 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009572#ifdef __cplusplus
9573extern "C"
9574#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009575char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009576int
9577main ()
9578{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009580 ;
9581 return 0;
9582}
9583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009584if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009585 ac_cv_lib_intl_textdomain=yes
9586else
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009589rm -f core conftest.err conftest.$ac_objext \
9590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009591LIBS=$ac_check_lib_save_LIBS
9592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9594$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009595if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009596
Matthias Kloseb9621712010-04-24 17:59:49 +00009597$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009598
Brett Cannonc6d936e2009-06-07 20:09:53 +00009599 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009600fi
9601
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009602
9603# checks for system dependent C++ extensions support
9604case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9606$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009608/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009609
Georg Brandl59e87bd2011-02-15 19:48:59 +00009610 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009611int
9612main ()
9613{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009614loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ;
9616 return 0;
9617}
Matthias Kloseb159a552010-04-25 21:00:44 +00009618
Martin v. Löwis11437992002-04-12 09:54:03 +00009619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009620if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009621
Matthias Kloseb159a552010-04-25 21:00:44 +00009622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
Matthias Kloseb159a552010-04-25 21:00:44 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009627
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009628else
Matthias Kloseb159a552010-04-25 21:00:44 +00009629
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009631$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009632
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009634rm -f core conftest.err conftest.$ac_objext \
9635 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009636 *) ;;
9637esac
9638
Christian Heimes985ecdc2013-11-20 11:46:18 +01009639# check for systems that require aligned memory access
9640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9641$as_echo_n "checking aligned memory access is required... " >&6; }
9642if test "$cross_compiling" = yes; then :
9643 aligned_required=yes
9644else
9645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9646/* end confdefs.h. */
9647
9648int main()
9649{
9650 char s[16];
9651 int i, *p1, *p2;
9652 for (i=0; i < 16; i++)
9653 s[i] = i;
9654 p1 = (int*)(s+1);
9655 p2 = (int*)(s+2);
9656 if (*p1 == *p2)
9657 return 1;
9658 return 0;
9659}
9660
9661_ACEOF
9662if ac_fn_c_try_run "$LINENO"; then :
9663 aligned_required=no
9664else
9665 aligned_required=yes
9666fi
9667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9668 conftest.$ac_objext conftest.beam conftest.$ac_ext
9669fi
9670
9671
9672if test "$aligned_required" = yes ; then
9673
9674$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9675
9676fi
9677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9678$as_echo "$aligned_required" >&6; }
9679
9680
9681# str, bytes and memoryview hash algorithm
9682
9683
9684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9685$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9686
9687# Check whether --with-hash_algorithm was given.
9688if test "${with_hash_algorithm+set}" = set; then :
9689 withval=$with_hash_algorithm;
9690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9691$as_echo "$withval" >&6; }
9692case "$withval" in
9693 siphash24)
9694 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9695
9696 ;;
9697 fnv)
9698 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9699
9700 ;;
9701 *)
9702 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9703 ;;
9704esac
9705
9706else
9707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9708$as_echo "default" >&6; }
9709fi
9710
9711
Charles-François Natalid30b0222014-05-08 23:08:51 +01009712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9713$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9714
9715# Check whether --with-address_sanitizer was given.
9716if test "${with_address_sanitizer+set}" = set; then :
9717 withval=$with_address_sanitizer;
9718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9719$as_echo "$withval" >&6; }
9720BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9721LDFLAGS="-fsanitize=address $LDFLAGS"
9722
9723else
9724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9725$as_echo "no" >&6; }
9726fi
9727
9728
Guido van Rossum70c7f481998-03-26 18:44:10 +00009729# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9731$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009732if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009733 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009734else
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009736LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009740/* Override any GCC internal prototype to avoid an error.
9741 Use char because int might match the return type of a GCC
9742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009743#ifdef __cplusplus
9744extern "C"
9745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009746char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009747int
9748main ()
9749{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 ;
9752 return 0;
9753}
9754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009755if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009757else
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009760rm -f core conftest.err conftest.$ac_objext \
9761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9765$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009766if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009767 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009768fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009769 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9771$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009772if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009774else
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009776LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780/* Override any GCC internal prototype to avoid an error.
9781 Use char because int might match the return type of a GCC
9782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783#ifdef __cplusplus
9784extern "C"
9785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009786char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009787int
9788main ()
9789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ;
9792 return 0;
9793}
9794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009795if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009797else
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009800rm -f core conftest.err conftest.$ac_objext \
9801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009802LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9805$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009806if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009807 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009808fi
9809 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009810
Matthias Kloseb9621712010-04-24 17:59:49 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9812$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009815if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9818$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009819LIBS="$withval $LIBS"
9820
9821else
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9823$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824fi
9825
Guido van Rossum7f43da71994-08-01 12:15:30 +00009826
Victor Stinner8291b5e2015-03-20 16:03:14 +01009827
9828
9829
9830
9831
9832
9833
9834if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9835 if test -n "$ac_tool_prefix"; then
9836 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9837set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9839$as_echo_n "checking for $ac_word... " >&6; }
9840if ${ac_cv_path_PKG_CONFIG+:} false; then :
9841 $as_echo_n "(cached) " >&6
9842else
9843 case $PKG_CONFIG in
9844 [\\/]* | ?:[\\/]*)
9845 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9846 ;;
9847 *)
9848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9849for as_dir in $PATH
9850do
9851 IFS=$as_save_IFS
9852 test -z "$as_dir" && as_dir=.
9853 for ac_exec_ext in '' $ac_executable_extensions; do
9854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9855 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9857 break 2
9858 fi
9859done
9860 done
9861IFS=$as_save_IFS
9862
9863 ;;
9864esac
9865fi
9866PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9867if test -n "$PKG_CONFIG"; then
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9869$as_echo "$PKG_CONFIG" >&6; }
9870else
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9872$as_echo "no" >&6; }
9873fi
9874
9875
9876fi
9877if test -z "$ac_cv_path_PKG_CONFIG"; then
9878 ac_pt_PKG_CONFIG=$PKG_CONFIG
9879 # Extract the first word of "pkg-config", so it can be a program name with args.
9880set dummy pkg-config; ac_word=$2
9881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9882$as_echo_n "checking for $ac_word... " >&6; }
9883if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9884 $as_echo_n "(cached) " >&6
9885else
9886 case $ac_pt_PKG_CONFIG in
9887 [\\/]* | ?:[\\/]*)
9888 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9889 ;;
9890 *)
9891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9892for as_dir in $PATH
9893do
9894 IFS=$as_save_IFS
9895 test -z "$as_dir" && as_dir=.
9896 for ac_exec_ext in '' $ac_executable_extensions; do
9897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9898 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9900 break 2
9901 fi
9902done
9903 done
9904IFS=$as_save_IFS
9905
9906 ;;
9907esac
9908fi
9909ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9910if test -n "$ac_pt_PKG_CONFIG"; then
9911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9912$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9913else
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9915$as_echo "no" >&6; }
9916fi
9917
9918 if test "x$ac_pt_PKG_CONFIG" = x; then
9919 PKG_CONFIG=""
9920 else
9921 case $cross_compiling:$ac_tool_warned in
9922yes:)
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9924$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9925ac_tool_warned=yes ;;
9926esac
9927 PKG_CONFIG=$ac_pt_PKG_CONFIG
9928 fi
9929else
9930 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9931fi
9932
9933fi
9934if test -n "$PKG_CONFIG"; then
9935 _pkg_min_version=0.9.0
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9937$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9938 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9940$as_echo "yes" >&6; }
9941 else
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9943$as_echo "no" >&6; }
9944 PKG_CONFIG=""
9945 fi
9946fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009947
9948# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9950$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009951
9952# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009953if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009954 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009955else
9956 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009957fi
9958
9959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9961$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009962
9963# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9965$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009966
9967# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009968if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009969 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009970else
9971 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009972fi
9973
9974
9975if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009976 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9977else
9978 LIBFFI_INCLUDEDIR=""
9979fi
9980
9981
Matthias Kloseb9621712010-04-24 17:59:49 +00009982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9983$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009984
Stefan Krah60187b52012-03-23 19:06:27 +01009985# Check for use of the system libmpdec library
9986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9987$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9988
9989# Check whether --with-system_libmpdec was given.
9990if test "${with_system_libmpdec+set}" = set; then :
9991 withval=$with_system_libmpdec;
9992else
9993 with_system_libmpdec="no"
9994fi
9995
9996
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9998$as_echo "$with_system_libmpdec" >&6; }
9999
Benjamin Peterson076ed002010-10-31 17:11:02 +000010000# Check for support for loadable sqlite extensions
10001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10002$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10003# Check whether --enable-loadable-sqlite-extensions was given.
10004if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10005 enableval=$enable_loadable_sqlite_extensions;
10006else
10007 enable_loadable_sqlite_extensions="no"
10008fi
10009
10010
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10012$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10013
Ned Deilyd819b932013-09-06 01:07:05 -070010014# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10015
10016
10017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10018$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10019
10020# Check whether --with-tcltk-includes was given.
10021if test "${with_tcltk_includes+set}" = set; then :
10022 withval=$with_tcltk_includes;
10023else
10024 with_tcltk_includes="default"
10025fi
10026
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10028$as_echo "$with_tcltk_includes" >&6; }
10029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10030$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10031
10032# Check whether --with-tcltk-libs was given.
10033if test "${with_tcltk_libs+set}" = set; then :
10034 withval=$with_tcltk_libs;
10035else
10036 with_tcltk_libs="default"
10037fi
10038
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10040$as_echo "$with_tcltk_libs" >&6; }
10041if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10042then
10043 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10044 then
10045 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10046 fi
10047 TCLTK_INCLUDES=""
10048 TCLTK_LIBS=""
10049else
10050 TCLTK_INCLUDES="$with_tcltk_includes"
10051 TCLTK_LIBS="$with_tcltk_libs"
10052fi
10053
Matthias Klose55708cc2009-04-30 08:06:49 +000010054# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10056$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010057
10058# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010059if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010060 withval=$with_dbmliborder;
10061if test x$with_dbmliborder = xyes
10062then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010063as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010064else
10065 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10066 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10067 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010068 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010069 fi
10070 done
10071fi
10072fi
10073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10075$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010076
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010077# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010078
10079
Matthias Kloseb9621712010-04-24 17:59:49 +000010080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10081$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 withval=$with_signal_module;
10086fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010087
10088
10089if test -z "$with_signal_module"
10090then with_signal_module="yes"
10091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10093$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010094
10095if test "${with_signal_module}" = "yes"; then
10096 USE_SIGNAL_MODULE=""
10097 SIGNAL_OBJS=""
10098else
10099 USE_SIGNAL_MODULE="#"
10100 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10101fi
10102
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010103# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010104
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010105USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107
Martin v. Löwis11437992002-04-12 09:54:03 +000010108
10109# Templates for things AC_DEFINEd more than once.
10110# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010111
10112
Martin v. Löwis11437992002-04-12 09:54:03 +000010113
Matthias Kloseb9621712010-04-24 17:59:49 +000010114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10115$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010118if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119 withval=$with_threads;
10120fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010121
10122
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010123# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010126if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010127 withval=$with_thread; with_threads=$with_thread
10128fi
10129
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010130
10131if test -z "$with_threads"
10132then with_threads="yes"
10133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10135$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010136
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010137
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010138if test "$with_threads" = "no"
10139then
10140 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010141elif test "$ac_cv_pthread_is_default" = yes
10142then
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010144
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010145 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010147
10148 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010150elif test "$ac_cv_kpthread" = "yes"
10151then
10152 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010153 if test "$ac_cv_cxx_thread" = "yes"; then
10154 CXX="$CXX -Kpthread"
10155 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010156 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010157
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010158 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010159 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010160elif test "$ac_cv_kthread" = "yes"
10161then
10162 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010163 if test "$ac_cv_cxx_thread" = "yes"; then
10164 CXX="$CXX -Kthread"
10165 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010167
10168 posix_threads=yes
10169 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010170elif test "$ac_cv_pthread" = "yes"
10171then
10172 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010173 if test "$ac_cv_cxx_thread" = "yes"; then
10174 CXX="$CXX -pthread"
10175 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010176 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010177
10178 posix_threads=yes
10179 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010180else
10181 if test ! -z "$with_threads" -a -d "$with_threads"
10182 then LDFLAGS="$LDFLAGS -L$with_threads"
10183 fi
10184 if test ! -z "$withval" -a -d "$withval"
10185 then LDFLAGS="$LDFLAGS -L$withval"
10186 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010187
10188 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010189 # define _POSIX_THREADS in unistd.h. Some apparently don't
10190 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10192$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010194/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010195
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010196#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010197#ifdef _POSIX_THREADS
10198yes
10199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010200
10201_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010204 unistd_defines_pthreads=yes
10205else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010206 unistd_defines_pthreads=no
10207fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010208rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010209
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10211$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010212
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010214
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010215 # Just looking for pthread_create in libpthread is not enough:
10216 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10217 # So we really have to include pthread.h, and then link.
10218 _libs=$LIBS
10219 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10221$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010223/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010224
10225#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010226#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010227
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010228void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010229int
10230main ()
10231{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010232
10233pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ;
10235 return 0;
10236}
10237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10241$as_echo "yes" >&6; }
10242 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010243
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010244 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010245 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010246else
Martin v. Löwis11437992002-04-12 09:54:03 +000010247
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010248 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010250if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010252
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010253 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010254 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010255else
Guido van Rossumad678af1998-10-02 14:42:15 +000010256
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10258$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010259if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010261else
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010263LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267/* Override any GCC internal prototype to avoid an error.
10268 Use char because int might match the return type of a GCC
10269 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010270#ifdef __cplusplus
10271extern "C"
10272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010273char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010274int
10275main ()
10276{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010278 ;
10279 return 0;
10280}
10281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010284else
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287rm -f core conftest.err conftest.$ac_objext \
10288 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010289LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10292$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010293if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010295
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010296 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010297 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010298 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010299else
Greg Steinadf63d62000-07-05 10:38:09 +000010300
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10302$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010303if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010305else
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010307LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311/* Override any GCC internal prototype to avoid an error.
10312 Use char because int might match the return type of a GCC
10313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314#ifdef __cplusplus
10315extern "C"
10316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010317char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010318int
10319main ()
10320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ;
10323 return 0;
10324}
10325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010328else
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010331rm -f core conftest.err conftest.$ac_objext \
10332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010333LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10336$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010337if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010339
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010340 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010341 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010342 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010343else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010344
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10346$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010347if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010349else
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010351LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355/* Override any GCC internal prototype to avoid an error.
10356 Use char because int might match the return type of a GCC
10357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010358#ifdef __cplusplus
10359extern "C"
10360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010361char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010362int
10363main ()
10364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010365return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 ;
10367 return 0;
10368}
10369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010372else
Matthias Kloseb9621712010-04-24 17:59:49 +000010373 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010375rm -f core conftest.err conftest.$ac_objext \
10376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010377LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10380$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010381if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010383
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010384 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010385 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010386 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010387else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010388
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10390$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010391if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010393else
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010395LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399/* Override any GCC internal prototype to avoid an error.
10400 Use char because int might match the return type of a GCC
10401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010402#ifdef __cplusplus
10403extern "C"
10404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010405char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010406int
10407main ()
10408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010416else
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010419rm -f core conftest.err conftest.$ac_objext \
10420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010421LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10424$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010425if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010427
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010428 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010429 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010430 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010431else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010432
Martin v. Löwis130fb172001-07-19 11:00:41 +000010433 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010434fi
10435
Guido van Rossum627b2d71993-12-24 10:39:16 +000010436
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010437fi
10438
Guido van Rossum0be3e491997-05-22 20:33:33 +000010439fi
10440
Guido van Rossum49545951997-12-02 19:28:29 +000010441fi
10442
Guido van Rossumb93a8621998-05-07 13:27:32 +000010443fi
10444
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010446rm -f core conftest.err conftest.$ac_objext \
10447 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010448
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10450$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010451if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010452 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010453else
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010455LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010459/* Override any GCC internal prototype to avoid an error.
10460 Use char because int might match the return type of a GCC
10461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010462#ifdef __cplusplus
10463extern "C"
10464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010465char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010466int
10467main ()
10468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010470 ;
10471 return 0;
10472}
10473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010475 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010476else
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010479rm -f core conftest.err conftest.$ac_objext \
10480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010481LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10484$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010485if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010487
Martin v. Löwis130fb172001-07-19 11:00:41 +000010488 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010489 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010490 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491fi
10492
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010493
Neal Norwitza978ab02002-11-02 16:58:05 +000010494 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10496$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010497if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010499else
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010501LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505/* Override any GCC internal prototype to avoid an error.
10506 Use char because int might match the return type of a GCC
10507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010508#ifdef __cplusplus
10509extern "C"
10510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010511char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010512int
10513main ()
10514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010515return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010516 ;
10517 return 0;
10518}
10519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010522else
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010525rm -f core conftest.err conftest.$ac_objext \
10526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010527LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10530$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010531if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010534 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010535 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010536 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010537fi
10538
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010539 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010540fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010541
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010542if test "$posix_threads" = "yes"; then
10543 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546
10547 fi
10548
10549 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10550 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010551 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010552$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010553
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554 ;;
10555 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010556$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010557
10558 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010559 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010560$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010561
10562 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010563 esac
10564
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10566$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010567 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010569else
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010571 ac_cv_pthread_system_supported=no
10572else
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010574/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010575
10576 #include <stdio.h>
10577 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010578 void *foo(void *parm) {
10579 return NULL;
10580 }
10581 main() {
10582 pthread_attr_t attr;
10583 pthread_t id;
10584 if (pthread_attr_init(&attr)) exit(-1);
10585 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10586 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10587 exit(0);
10588 }
10589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010590if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591 ac_cv_pthread_system_supported=yes
10592else
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10596 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010599
Guido van Rossum627b2d71993-12-24 10:39:16 +000010600fi
10601
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10603$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604 if test "$ac_cv_pthread_system_supported" = "yes"; then
10605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607
10608 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 for ac_func in pthread_sigmask
10610do :
10611 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010612if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010613 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010614#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010616 case $ac_sys_system in
10617 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618
Matthias Kloseb9621712010-04-24 17:59:49 +000010619$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010620
10621 ;;
10622 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010623fi
10624done
10625
Christian Heimesf77b4b22013-08-21 13:26:05 +020010626 for ac_func in pthread_atfork
10627do :
10628 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10629if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10630 cat >>confdefs.h <<_ACEOF
10631#define HAVE_PTHREAD_ATFORK 1
10632_ACEOF
10633
10634fi
10635done
10636
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010637fi
10638
10639
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010641
Matthias Kloseb9621712010-04-24 17:59:49 +000010642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10643$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010645if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010647 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010650 ipv6=no
10651 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10653$as_echo "yes" >&6; }
10654 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655
10656 ipv6=yes
10657 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659else
Martin v. Löwis11437992002-04-12 09:54:03 +000010660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010663 /* AF_INET6 available check */
10664#include <sys/types.h>
10665#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010666int
10667main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010668{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010669int domain = AF_INET6;
10670 ;
10671 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010672}
Martin v. Löwis11437992002-04-12 09:54:03 +000010673_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010674if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10677$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010679
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680else
Matthias Kloseb159a552010-04-25 21:00:44 +000010681
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010685
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010686fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010689if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10691$as_echo_n "checking if RFC2553 API is available... " >&6; }
10692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010694
10695 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010696#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010697int
10698main ()
10699{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010700struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010701 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010702 ;
10703 return 0;
10704}
Matthias Kloseb159a552010-04-25 21:00:44 +000010705
Martin v. Löwis11437992002-04-12 09:54:03 +000010706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010707if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010708
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010710$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010711 ipv6=yes
10712
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010713else
Matthias Kloseb159a552010-04-25 21:00:44 +000010714
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010716$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010717 ipv6=no
10718
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010721fi
10722
10723if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010725
10726fi
10727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728fi
10729
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730
10731ipv6type=unknown
10732ipv6lib=none
10733ipv6trylibc=no
10734
10735if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10737$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010738 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10739 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010740 case $i in
10741 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010743/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010744
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745#include <netinet/in.h>
10746#ifdef IPV6_INRIA_VERSION
10747yes
10748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010749_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010752 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010754rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755
10756 ;;
10757 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010759/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010760
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761#include <netinet/in.h>
10762#ifdef __KAME__
10763yes
10764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010765_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768 ipv6type=$i;
10769 ipv6lib=inet6
10770 ipv6libdir=/usr/local/v6/lib
10771 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010773rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774
10775 ;;
10776 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010778/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010779
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780#include <features.h>
10781#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10782yes
10783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010784_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787 ipv6type=$i;
10788 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010790rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791
10792 ;;
10793 linux-inet6)
10794 if test -d /usr/inet6; then
10795 ipv6type=$i
10796 ipv6lib=inet6
10797 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010798 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799 fi
10800 ;;
10801 solaris)
10802 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010803 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804 ipv6type=$i
10805 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806 fi
10807 fi
10808 ;;
10809 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010812
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813#include <sys/param.h>
10814#ifdef _TOSHIBA_INET6
10815yes
10816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010817_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820 ipv6type=$i;
10821 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010822 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010824rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825
10826 ;;
10827 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831#include </usr/local/v6/include/sys/v6config.h>
10832#ifdef __V6D__
10833yes
10834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010835_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838 ipv6type=$i;
10839 ipv6lib=v6;
10840 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010841 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010843rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844
10845 ;;
10846 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010848/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010849
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850#include <sys/param.h>
10851#ifdef _ZETA_MINAMI_INET6
10852yes
10853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010854_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857 ipv6type=$i;
10858 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010859 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010861rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862
10863 ;;
10864 esac
10865 if test "$ipv6type" != "unknown"; then
10866 break
10867 fi
10868 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10870$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871fi
10872
10873if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10874 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10875 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10876 echo "using lib$ipv6lib"
10877 else
10878 if test $ipv6trylibc = "yes"; then
10879 echo "using libc"
10880 else
10881 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10882 echo "You need to fetch lib$ipv6lib.a from appropriate"
10883 echo 'ipv6 kit and compile beforehand.'
10884 exit 1
10885 fi
10886 fi
10887fi
10888
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10890$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10892/* end confdefs.h. */
10893 /* CAN_RAW_FD_FRAMES available check */
10894#include <linux/can/raw.h>
10895int
10896main ()
10897{
10898int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10899 ;
10900 return 0;
10901}
10902_ACEOF
10903if ac_fn_c_try_compile "$LINENO"; then :
10904
10905
10906$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10907
10908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10909$as_echo "yes" >&6; }
10910
10911else
10912
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914$as_echo "no" >&6; }
10915
10916fi
10917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10920$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010922/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010923
10924 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010925int
10926main ()
10927{
10928FSIORefNum fRef = 0
10929 ;
10930 return 0;
10931}
Matthias Kloseb159a552010-04-25 21:00:44 +000010932
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010934if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010935
Matthias Kloseb159a552010-04-25 21:00:44 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10940$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010941
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010942else
Matthias Kloseb159a552010-04-25 21:00:44 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10945$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010946
10947fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10949
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010950# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10952$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010955if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956 withval=$with_doc_strings;
10957fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010958
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010959
10960if test -z "$with_doc_strings"
10961then with_doc_strings="yes"
10962fi
10963if test "$with_doc_strings" != "no"
10964then
10965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010967
10968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10970$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010971
Antoine Pitrou042b1282010-08-13 21:15:58 +000010972# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10974$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010976# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010977if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010979if test "$withval" != no
10980then
10981
Matthias Kloseb9621712010-04-24 17:59:49 +000010982$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10985$as_echo "yes" >&6; }
10986else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10987$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010988fi
10989else
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10991$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992fi
10993
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010994
10995# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10997$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011000if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001 withval=$with_pymalloc;
11002fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011003
Neil Schemenauera35c6882001-02-27 04:45:05 +000011004
Neil Schemenauer16c22972002-03-22 15:34:49 +000011005if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011006then
11007 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011008fi
11009if test "$with_pymalloc" != "no"
11010then
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011013
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011014 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11017$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011018
Benjamin Peterson05159c42009-12-03 03:01:27 +000011019# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11021$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011022
11023# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011024if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011025 withval=$with_valgrind;
11026else
11027 with_valgrind=no
11028fi
11029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11031$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011032if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 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 +020011034if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011037
11038else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011039 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011040
11041fi
11042
11043
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011044 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011045fi
11046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011047# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011048
Guido van Rossum98935bf2001-09-05 19:13:16 +000011049DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011050
Guido van Rossume97ee181999-12-20 21:27:22 +000011051# the dlopen() function means we might want to use dynload_shlib.o. some
11052# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011053for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011054do :
11055 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011056if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011058#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011059_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011060
Guido van Rossume97ee181999-12-20 21:27:22 +000011061fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011062done
Guido van Rossume97ee181999-12-20 21:27:22 +000011063
Michael W. Hudson54241132001-12-07 15:38:26 +000011064
Guido van Rossume97ee181999-12-20 21:27:22 +000011065# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11066# loading of modules.
11067
Matthias Kloseb9621712010-04-24 17:59:49 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11069$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011070if test -z "$DYNLOADFILE"
11071then
11072 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011073 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11074 if test "$ac_cv_func_dlopen" = yes
11075 then DYNLOADFILE="dynload_shlib.o"
11076 else DYNLOADFILE="dynload_aix.o"
11077 fi
11078 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011079 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011080 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11081 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011082 *)
11083 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11084 # out any dynamic loading
11085 if test "$ac_cv_func_dlopen" = yes
11086 then DYNLOADFILE="dynload_shlib.o"
11087 else DYNLOADFILE="dynload_stub.o"
11088 fi
11089 ;;
11090 esac
11091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11093$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011094if test "$DYNLOADFILE" != "dynload_stub.o"
11095then
Martin v. Löwis11437992002-04-12 09:54:03 +000011096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011098
11099fi
11100
Neil Schemenauer4e425612001-06-19 15:44:15 +000011101# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11102
Michael W. Hudson54241132001-12-07 15:38:26 +000011103
Matthias Kloseb9621712010-04-24 17:59:49 +000011104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11105$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011106if test -z "$MACHDEP_OBJS"
11107then
Jack Jansene578a632001-08-15 01:27:14 +000011108 MACHDEP_OBJS=$extra_machdep_objs
11109else
11110 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011111fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011112if test -z "$MACHDEP_OBJS"; then
11113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11114$as_echo "none" >&6; }
11115else
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11117$as_echo "$MACHDEP_OBJS" >&6; }
11118fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011119
Guido van Rossum627b2d71993-12-24 10:39:16 +000011120# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011121for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011122 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011123 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011124 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011125 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011126 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011127 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011128 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11129 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011130 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011131 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011132 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011133 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011134 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011135 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011136 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11137 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011138 sigaction sigaltstack siginterrupt sigpending sigrelse \
11139 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011140 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011141 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011142 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011143do :
11144 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11145ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011146if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011148#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011149_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011150
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011151fi
11152done
11153
Michael W. Hudson54241132001-12-07 15:38:26 +000011154
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011155ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11156 #include <dirent.h>
11157"
11158if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11159
11160$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11161
11162fi
11163
11164
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011165# For some functions, having a definition is not sufficient, since
11166# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11168$as_echo_n "checking for chroot... " >&6; }
11169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011171#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011172int
11173main ()
11174{
11175void *x=chroot
11176 ;
11177 return 0;
11178}
11179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011181
Matthias Kloseb9621712010-04-24 17:59:49 +000011182$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011183
Matthias Kloseb159a552010-04-25 21:00:44 +000011184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011185$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011186else
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011189
11190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11193$as_echo_n "checking for link... " >&6; }
11194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011195/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011196#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011197int
11198main ()
11199{
11200void *x=link
11201 ;
11202 return 0;
11203}
11204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011205if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011208
Matthias Kloseb159a552010-04-25 21:00:44 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211else
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011214
11215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11218$as_echo_n "checking for symlink... " >&6; }
11219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011221#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011222int
11223main ()
11224{
11225void *x=symlink
11226 ;
11227 return 0;
11228}
11229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011230if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011231
Matthias Kloseb9621712010-04-24 17:59:49 +000011232$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011233
Matthias Kloseb159a552010-04-25 21:00:44 +000011234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011236else
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11238$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011239
11240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11243$as_echo_n "checking for fchdir... " >&6; }
11244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011246#include <unistd.h>
11247int
11248main ()
11249{
11250void *x=fchdir
11251 ;
11252 return 0;
11253}
11254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011255if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011256
Matthias Kloseb9621712010-04-24 17:59:49 +000011257$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011258
Matthias Kloseb159a552010-04-25 21:00:44 +000011259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011261else
Matthias Kloseb9621712010-04-24 17:59:49 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011264
11265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11268$as_echo_n "checking for fsync... " >&6; }
11269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011270/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011271#include <unistd.h>
11272int
11273main ()
11274{
11275void *x=fsync
11276 ;
11277 return 0;
11278}
11279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011283
Matthias Kloseb159a552010-04-25 21:00:44 +000011284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011286else
Matthias Kloseb9621712010-04-24 17:59:49 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011289
11290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11293$as_echo_n "checking for fdatasync... " >&6; }
11294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011296#include <unistd.h>
11297int
11298main ()
11299{
11300void *x=fdatasync
11301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011308
Matthias Kloseb159a552010-04-25 21:00:44 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011311else
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011314
11315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11318$as_echo_n "checking for epoll... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011320/* end confdefs.h. */
11321#include <sys/epoll.h>
11322int
11323main ()
11324{
11325void *x=epoll_create
11326 ;
11327 return 0;
11328}
11329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011333
Matthias Kloseb159a552010-04-25 21:00:44 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011336else
Matthias Kloseb9621712010-04-24 17:59:49 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011339
11340fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11343$as_echo_n "checking for epoll_create1... " >&6; }
11344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11345/* end confdefs.h. */
11346#include <sys/epoll.h>
11347int
11348main ()
11349{
11350void *x=epoll_create1
11351 ;
11352 return 0;
11353}
11354_ACEOF
11355if ac_fn_c_try_compile "$LINENO"; then :
11356
11357$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11358
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11360$as_echo "yes" >&6; }
11361else
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
11364
11365fi
11366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11368$as_echo_n "checking for kqueue... " >&6; }
11369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011370/* end confdefs.h. */
11371
11372#include <sys/types.h>
11373#include <sys/event.h>
11374
11375int
11376main ()
11377{
11378int x=kqueue()
11379 ;
11380 return 0;
11381}
11382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011383if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011384
Matthias Kloseb9621712010-04-24 17:59:49 +000011385$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011386
Matthias Kloseb159a552010-04-25 21:00:44 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011388$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011389else
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011392
11393fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11396$as_echo_n "checking for prlimit... " >&6; }
11397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11398/* end confdefs.h. */
11399
11400#include <sys/time.h>
11401#include <sys/resource.h>
11402
11403int
11404main ()
11405{
11406void *x=prlimit
11407 ;
11408 return 0;
11409}
11410_ACEOF
11411if ac_fn_c_try_compile "$LINENO"; then :
11412
11413$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11414
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11416$as_echo "yes" >&6; }
11417else
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
11420
11421fi
11422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11423
Martin v. Löwisd5843682002-11-21 20:41:28 +000011424# On some systems (eg. FreeBSD 5), we would find a definition of the
11425# functions ctermid_r, setgroups in the library, but no prototype
11426# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11427# address to avoid compiler warnings and potential miscompilations
11428# because of the missing prototypes.
11429
Matthias Kloseb9621712010-04-24 17:59:49 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11431$as_echo_n "checking for ctermid_r... " >&6; }
11432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011434
Martin v. Löwisd5843682002-11-21 20:41:28 +000011435#include <stdio.h>
11436
Martin v. Löwisd5843682002-11-21 20:41:28 +000011437int
11438main ()
11439{
11440void* p = ctermid_r
11441 ;
11442 return 0;
11443}
11444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011446
Matthias Kloseb9621712010-04-24 17:59:49 +000011447$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011448
Matthias Kloseb159a552010-04-25 21:00:44 +000011449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011450$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011451else
Matthias Kloseb9621712010-04-24 17:59:49 +000011452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11453$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011454
11455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11457
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11459$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011460if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011461 $as_echo_n "(cached) " >&6
11462else
11463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011464/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011465#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011466int
11467main ()
11468{
11469void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011470
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011471 ;
11472 return 0;
11473}
11474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011475if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011476 ac_cv_flock_decl=yes
11477else
11478 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011479
11480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011482
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011483fi
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11485$as_echo "$ac_cv_flock_decl" >&6; }
11486if test "x${ac_cv_flock_decl}" = xyes; then
11487 for ac_func in flock
11488do :
11489 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011490if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011491 cat >>confdefs.h <<_ACEOF
11492#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011493_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011494
Antoine Pitroua3000072010-09-07 14:52:42 +000011495else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011497$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011498if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011499 $as_echo_n "(cached) " >&6
11500else
11501 ac_check_lib_save_LIBS=$LIBS
11502LIBS="-lbsd $LIBS"
11503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11504/* end confdefs.h. */
11505
11506/* Override any GCC internal prototype to avoid an error.
11507 Use char because int might match the return type of a GCC
11508 builtin and then its argument prototype would still apply. */
11509#ifdef __cplusplus
11510extern "C"
11511#endif
11512char flock ();
11513int
11514main ()
11515{
11516return flock ();
11517 ;
11518 return 0;
11519}
11520_ACEOF
11521if ac_fn_c_try_link "$LINENO"; then :
11522 ac_cv_lib_bsd_flock=yes
11523else
11524 ac_cv_lib_bsd_flock=no
11525fi
11526rm -f core conftest.err conftest.$ac_objext \
11527 conftest$ac_exeext conftest.$ac_ext
11528LIBS=$ac_check_lib_save_LIBS
11529fi
11530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11531$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011532if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011533 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011534
11535
11536$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11537
11538
11539fi
11540
11541
11542fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011543done
11544
Antoine Pitroua3000072010-09-07 14:52:42 +000011545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546
Matthias Kloseb9621712010-04-24 17:59:49 +000011547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11548$as_echo_n "checking for getpagesize... " >&6; }
11549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011550/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011551
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011552#include <unistd.h>
11553
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011554int
11555main ()
11556{
11557void* p = getpagesize
11558 ;
11559 return 0;
11560}
11561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011565
Matthias Kloseb159a552010-04-25 21:00:44 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011567$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011571
11572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011574
Victor Stinner984890f2011-11-24 13:53:38 +010011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11576$as_echo_n "checking for broken unsetenv... " >&6; }
11577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11578/* end confdefs.h. */
11579
11580#include <stdlib.h>
11581
11582int
11583main ()
11584{
11585int res = unsetenv("DUMMY")
11586 ;
11587 return 0;
11588}
11589_ACEOF
11590if ac_fn_c_try_compile "$LINENO"; then :
11591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593else
11594
11595$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11596
11597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11598$as_echo "yes" >&6; }
11599
11600fi
11601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11602
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011603for ac_prog in true
11604do
11605 # Extract the first word of "$ac_prog", so it can be a program name with args.
11606set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11608$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011609if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011611else
11612 if test -n "$TRUE"; then
11613 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11614else
11615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11616for as_dir in $PATH
11617do
11618 IFS=$as_save_IFS
11619 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011622 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 $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 +000011624 break 2
11625 fi
11626done
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011629
11630fi
11631fi
11632TRUE=$ac_cv_prog_TRUE
11633if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11635$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011636else
Matthias Kloseb9621712010-04-24 17:59:49 +000011637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11638$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011639fi
11640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011642 test -n "$TRUE" && break
11643done
11644test -n "$TRUE" || TRUE="/bin/true"
11645
11646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11648$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011649if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011651else
11652 ac_check_lib_save_LIBS=$LIBS
11653LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011655/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657/* Override any GCC internal prototype to avoid an error.
11658 Use char because int might match the return type of a GCC
11659 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011660#ifdef __cplusplus
11661extern "C"
11662#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011663char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011664int
11665main ()
11666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011668 ;
11669 return 0;
11670}
11671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011673 ac_cv_lib_c_inet_aton=yes
11674else
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011677rm -f core conftest.err conftest.$ac_objext \
11678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011679LIBS=$ac_check_lib_save_LIBS
11680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11682$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011683if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011684 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11687$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011688if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011690else
11691 ac_check_lib_save_LIBS=$LIBS
11692LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011694/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696/* Override any GCC internal prototype to avoid an error.
11697 Use char because int might match the return type of a GCC
11698 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011699#ifdef __cplusplus
11700extern "C"
11701#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011702char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011703int
11704main ()
11705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011706return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011707 ;
11708 return 0;
11709}
11710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011712 ac_cv_lib_resolv_inet_aton=yes
11713else
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011716rm -f core conftest.err conftest.$ac_objext \
11717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011718LIBS=$ac_check_lib_save_LIBS
11719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11721$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011722if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011723 cat >>confdefs.h <<_ACEOF
11724#define HAVE_LIBRESOLV 1
11725_ACEOF
11726
11727 LIBS="-lresolv $LIBS"
11728
11729fi
11730
11731
11732fi
11733
11734
Christian Heimesd0764e22007-12-04 15:00:33 +000011735# On Tru64, chflags seems to be present, but calling it will
11736# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11738$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011739if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011741else
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011743 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011746/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011747
Christian Heimesd0764e22007-12-04 15:00:33 +000011748#include <sys/stat.h>
11749#include <unistd.h>
11750int main(int argc, char*argv[])
11751{
11752 if(chflags(argv[0], 0) != 0)
11753 return 1;
11754 return 0;
11755}
Ned Deily3eb67d52011-06-28 00:00:28 -070011756
Christian Heimesd0764e22007-12-04 15:00:33 +000011757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011758if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011759 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011765fi
11766
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011767
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11770$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011771if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011773if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011774 ac_cv_have_chflags="yes"
11775else
11776 ac_cv_have_chflags="no"
11777fi
11778
11779fi
11780if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011783
11784fi
11785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11787$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011788if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011792 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011795/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011796
Christian Heimesd0764e22007-12-04 15:00:33 +000011797#include <sys/stat.h>
11798#include <unistd.h>
11799int main(int argc, char*argv[])
11800{
11801 if(lchflags(argv[0], 0) != 0)
11802 return 1;
11803 return 0;
11804}
Ned Deily3eb67d52011-06-28 00:00:28 -070011805
Christian Heimesd0764e22007-12-04 15:00:33 +000011806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011808 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011814fi
11815
11816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11819$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011820if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011822if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011823 ac_cv_have_lchflags="yes"
11824else
11825 ac_cv_have_lchflags="no"
11826fi
11827
11828fi
11829if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011830
Matthias Kloseb9621712010-04-24 17:59:49 +000011831$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011832
11833fi
11834
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011835case $ac_sys_system/$ac_sys_release in
11836Darwin/*)
11837 _CUR_CFLAGS="${CFLAGS}"
11838 _CUR_LDFLAGS="${LDFLAGS}"
11839 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11840 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11841 ;;
11842esac
11843
Matthias Kloseb9621712010-04-24 17:59:49 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11845$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011846if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011848else
11849 ac_check_lib_save_LIBS=$LIBS
11850LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011852/* end confdefs.h. */
11853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011854/* Override any GCC internal prototype to avoid an error.
11855 Use char because int might match the return type of a GCC
11856 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011857#ifdef __cplusplus
11858extern "C"
11859#endif
11860char inflateCopy ();
11861int
11862main ()
11863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011864return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011865 ;
11866 return 0;
11867}
11868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011869if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011870 ac_cv_lib_z_inflateCopy=yes
11871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011874rm -f core conftest.err conftest.$ac_objext \
11875 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011876LIBS=$ac_check_lib_save_LIBS
11877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11879$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011880if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011883
11884fi
11885
11886
11887case $ac_sys_system/$ac_sys_release in
11888Darwin/*)
11889 CFLAGS="${_CUR_CFLAGS}"
11890 LDFLAGS="${_CUR_LDFLAGS}"
11891 ;;
11892esac
11893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11895$as_echo_n "checking for hstrerror... " >&6; }
11896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011897/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011898
Martin v. Löwise9416172003-05-03 10:12:45 +000011899#include <netdb.h>
11900
Martin v. Löwise9416172003-05-03 10:12:45 +000011901int
11902main ()
11903{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011904void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011905 ;
11906 return 0;
11907}
11908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011912
Matthias Kloseb159a552010-04-25 21:00:44 +000011913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011915else
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11917$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011918
11919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011920rm -f core conftest.err conftest.$ac_objext \
11921 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11924$as_echo_n "checking for inet_aton... " >&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öwis86d66262006-02-17 08:40:11 +000011928#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011929#include <sys/socket.h>
11930#include <netinet/in.h>
11931#include <arpa/inet.h>
11932
Martin v. Löwise9416172003-05-03 10:12:45 +000011933int
11934main ()
11935{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011936void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011937 ;
11938 return 0;
11939}
11940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011944
Matthias Kloseb159a552010-04-25 21:00:44 +000011945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011946$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011950
11951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011952rm -f core conftest.err conftest.$ac_objext \
11953 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11956$as_echo_n "checking for inet_pton... " >&6; }
11957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011958/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011959
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011960#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011961#include <sys/socket.h>
11962#include <netinet/in.h>
11963#include <arpa/inet.h>
11964
Martin v. Löwise9416172003-05-03 10:12:45 +000011965int
11966main ()
11967{
11968void* p = inet_pton
11969 ;
11970 return 0;
11971}
11972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011973if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011976
Matthias Kloseb159a552010-04-25 21:00:44 +000011977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011978$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011979else
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11981$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011982
11983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011985
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011986# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11988$as_echo_n "checking for setgroups... " >&6; }
11989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011990/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011991
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011992#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011993#ifdef HAVE_GRP_H
11994#include <grp.h>
11995#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011996
Martin v. Löwisd5843682002-11-21 20:41:28 +000011997int
11998main ()
11999{
12000void* p = setgroups
12001 ;
12002 return 0;
12003}
12004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012008
Matthias Kloseb159a552010-04-25 21:00:44 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012010$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12013$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012014
12015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012017
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012018# check for openpty and forkpty
12019
12020for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012021do :
12022 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012023if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012025#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012026_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012027
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012028else
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12030$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012031if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012033else
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012035LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039/* Override any GCC internal prototype to avoid an error.
12040 Use char because int might match the return type of a GCC
12041 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012042#ifdef __cplusplus
12043extern "C"
12044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012045char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012046int
12047main ()
12048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 ;
12051 return 0;
12052}
12053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012055 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012059rm -f core conftest.err conftest.$ac_objext \
12060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012061LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12064$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012065if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012067 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012068else
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12070$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012071if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012073else
12074 ac_check_lib_save_LIBS=$LIBS
12075LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012077/* end confdefs.h. */
12078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079/* Override any GCC internal prototype to avoid an error.
12080 Use char because int might match the return type of a GCC
12081 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012082#ifdef __cplusplus
12083extern "C"
12084#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012085char openpty ();
12086int
12087main ()
12088{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012090 ;
12091 return 0;
12092}
12093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012094if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012095 ac_cv_lib_bsd_openpty=yes
12096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012099rm -f core conftest.err conftest.$ac_objext \
12100 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012101LIBS=$ac_check_lib_save_LIBS
12102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12104$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012105if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012107 LIBS="$LIBS -lbsd"
12108fi
12109
12110
12111fi
12112
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113
12114fi
12115done
12116
12117for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012118do :
12119 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012121 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012122#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012123_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012124
Fred Drake8cef4cf2000-06-28 16:40:38 +000012125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12127$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012128if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012130else
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012132LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136/* Override any GCC internal prototype to avoid an error.
12137 Use char because int might match the return type of a GCC
12138 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012139#ifdef __cplusplus
12140extern "C"
12141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012142char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012143int
12144main ()
12145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 ;
12148 return 0;
12149}
12150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012152 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156rm -f core conftest.err conftest.$ac_objext \
12157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012158LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12161$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012162if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012164 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12167$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012168if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012170else
12171 ac_check_lib_save_LIBS=$LIBS
12172LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012174/* end confdefs.h. */
12175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176/* Override any GCC internal prototype to avoid an error.
12177 Use char because int might match the return type of a GCC
12178 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012179#ifdef __cplusplus
12180extern "C"
12181#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012182char forkpty ();
12183int
12184main ()
12185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012187 ;
12188 return 0;
12189}
12190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012192 ac_cv_lib_bsd_forkpty=yes
12193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012196rm -f core conftest.err conftest.$ac_objext \
12197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012198LIBS=$ac_check_lib_save_LIBS
12199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12201$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012202if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012204 LIBS="$LIBS -lbsd"
12205fi
12206
12207
12208fi
12209
Fred Drake8cef4cf2000-06-28 16:40:38 +000012210
12211fi
12212done
12213
Jack Jansendd19cf82001-12-06 22:36:17 +000012214
Christian Heimesb186d002008-03-18 15:15:01 +000012215# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012216for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012217do :
12218 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012219if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012220 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012221#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012222_ACEOF
12223
12224fi
12225done
12226
12227
Michael W. Hudson54241132001-12-07 15:38:26 +000012228# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012229for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012230do :
12231 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12232ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012233if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012236_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012237
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012238fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012239done
12240
Michael W. Hudson54241132001-12-07 15:38:26 +000012241
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012242ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012244 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012245
Martin v. Löwis1142de32002-03-29 16:28:31 +000012246else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012247 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012248 *" dup2.$ac_objext "* ) ;;
12249 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012251esac
12252
Martin v. Löwis1142de32002-03-29 16:28:31 +000012253fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012255ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012256if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012257 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12258
12259else
12260 case " $LIBOBJS " in
12261 *" strdup.$ac_objext "* ) ;;
12262 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12263 ;;
12264esac
12265
12266fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012267
12268
12269for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012270do :
12271 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012272if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012274#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012277/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012279int
12280main ()
12281{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012282getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 ;
12284 return 0;
12285}
12286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012288
Matthias Kloseb9621712010-04-24 17:59:49 +000012289$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012290
Guido van Rossum627b2d71993-12-24 10:39:16 +000012291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012293
Guido van Rossum627b2d71993-12-24 10:39:16 +000012294fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012295done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012296
Jack Jansen150753c2003-03-29 22:07:47 +000012297for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012298do :
12299 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012302#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012305/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012306#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012307int
12308main ()
12309{
12310setpgrp(0,0);
12311 ;
12312 return 0;
12313}
12314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012318
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012321
12322fi
12323done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012324
Thomas Wouters3a584202000-08-05 23:28:51 +000012325for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012326do :
12327 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012330#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012333/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012334#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012335int
12336main ()
12337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 ;
12340 return 0;
12341}
12342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if ac_fn_c_try_compile "$LINENO"; then :
12344
Guido van Rossum627b2d71993-12-24 10:39:16 +000012345else
Skip Montanaro6dead952003-09-25 14:50:04 +000012346
Matthias Kloseb9621712010-04-24 17:59:49 +000012347$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012348
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
Guido van Rossum627b2d71993-12-24 10:39:16 +000012350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012352
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012353fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012354done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355
Michael W. Hudson54241132001-12-07 15:38:26 +000012356
Victor Stinnere0be4232011-10-25 13:06:09 +020012357for ac_func in clock_gettime
12358do :
12359 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12360if test "x$ac_cv_func_clock_gettime" = xyes; then :
12361 cat >>confdefs.h <<_ACEOF
12362#define HAVE_CLOCK_GETTIME 1
12363_ACEOF
12364
12365else
12366
12367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12368$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12369if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12370 $as_echo_n "(cached) " >&6
12371else
12372 ac_check_lib_save_LIBS=$LIBS
12373LIBS="-lrt $LIBS"
12374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12375/* end confdefs.h. */
12376
12377/* Override any GCC internal prototype to avoid an error.
12378 Use char because int might match the return type of a GCC
12379 builtin and then its argument prototype would still apply. */
12380#ifdef __cplusplus
12381extern "C"
12382#endif
12383char clock_gettime ();
12384int
12385main ()
12386{
12387return clock_gettime ();
12388 ;
12389 return 0;
12390}
12391_ACEOF
12392if ac_fn_c_try_link "$LINENO"; then :
12393 ac_cv_lib_rt_clock_gettime=yes
12394else
12395 ac_cv_lib_rt_clock_gettime=no
12396fi
12397rm -f core conftest.err conftest.$ac_objext \
12398 conftest$ac_exeext conftest.$ac_ext
12399LIBS=$ac_check_lib_save_LIBS
12400fi
12401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12402$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12403if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12404
Victor Stinner7efb8332014-08-29 15:41:08 +020012405 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012406 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12407
12408
12409$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12410
12411
12412fi
12413
12414
12415fi
12416done
12417
12418
12419for ac_func in clock_getres
12420do :
12421 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12422if test "x$ac_cv_func_clock_getres" = xyes; then :
12423 cat >>confdefs.h <<_ACEOF
12424#define HAVE_CLOCK_GETRES 1
12425_ACEOF
12426
12427else
12428
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12430$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12431if ${ac_cv_lib_rt_clock_getres+:} false; then :
12432 $as_echo_n "(cached) " >&6
12433else
12434 ac_check_lib_save_LIBS=$LIBS
12435LIBS="-lrt $LIBS"
12436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437/* end confdefs.h. */
12438
12439/* Override any GCC internal prototype to avoid an error.
12440 Use char because int might match the return type of a GCC
12441 builtin and then its argument prototype would still apply. */
12442#ifdef __cplusplus
12443extern "C"
12444#endif
12445char clock_getres ();
12446int
12447main ()
12448{
12449return clock_getres ();
12450 ;
12451 return 0;
12452}
12453_ACEOF
12454if ac_fn_c_try_link "$LINENO"; then :
12455 ac_cv_lib_rt_clock_getres=yes
12456else
12457 ac_cv_lib_rt_clock_getres=no
12458fi
12459rm -f core conftest.err conftest.$ac_objext \
12460 conftest$ac_exeext conftest.$ac_ext
12461LIBS=$ac_check_lib_save_LIBS
12462fi
12463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12464$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12465if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12466
12467 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12468
12469
12470fi
12471
12472
12473fi
12474done
12475
12476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12478$as_echo_n "checking for major... " >&6; }
12479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012480/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012481
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012482#if defined(MAJOR_IN_MKDEV)
12483#include <sys/mkdev.h>
12484#elif defined(MAJOR_IN_SYSMACROS)
12485#include <sys/sysmacros.h>
12486#else
12487#include <sys/types.h>
12488#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012489
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012490int
12491main ()
12492{
12493
12494 makedev(major(0),minor(0));
12495
12496 ;
12497 return 0;
12498}
12499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012500if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012501
12502
Matthias Kloseb9621712010-04-24 17:59:49 +000012503$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012504
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12506$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012507
12508else
Skip Montanaro6dead952003-09-25 14:50:04 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12511$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012512
12513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012514rm -f core conftest.err conftest.$ac_objext \
12515 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012516
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012517# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012518# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12520$as_echo_n "checking for getaddrinfo... " >&6; }
12521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012522/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012523
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012524#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012525#include <sys/socket.h>
12526#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012527#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012528
Martin v. Löwis11437992002-04-12 09:54:03 +000012529int
12530main ()
12531{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012532getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 ;
12534 return 0;
12535}
12536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012537if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012538 have_getaddrinfo=yes
12539else
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012542rm -f core conftest.err conftest.$ac_objext \
12543 conftest$ac_exeext conftest.$ac_ext
12544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12545$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012546if test $have_getaddrinfo = yes
12547then
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12549$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012550 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012552else
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012554
12555if test "${enable_ipv6+set}" = set; then
12556 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12557else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012558 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012559fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012560else
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012563
Stefan Krah19c21392012-11-22 23:47:32 +010012564#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012565#include <sys/types.h>
12566#include <netdb.h>
12567#include <string.h>
12568#include <sys/socket.h>
12569#include <netinet/in.h>
12570
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012571int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012572{
12573 int passive, gaierr, inet4 = 0, inet6 = 0;
12574 struct addrinfo hints, *ai, *aitop;
12575 char straddr[INET6_ADDRSTRLEN], strport[16];
12576
12577 for (passive = 0; passive <= 1; passive++) {
12578 memset(&hints, 0, sizeof(hints));
12579 hints.ai_family = AF_UNSPEC;
12580 hints.ai_flags = passive ? AI_PASSIVE : 0;
12581 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012582 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012583 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12584 (void)gai_strerror(gaierr);
12585 goto bad;
12586 }
12587 for (ai = aitop; ai; ai = ai->ai_next) {
12588 if (ai->ai_addr == NULL ||
12589 ai->ai_addrlen == 0 ||
12590 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12591 straddr, sizeof(straddr), strport, sizeof(strport),
12592 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12593 goto bad;
12594 }
12595 switch (ai->ai_family) {
12596 case AF_INET:
12597 if (strcmp(strport, "54321") != 0) {
12598 goto bad;
12599 }
12600 if (passive) {
12601 if (strcmp(straddr, "0.0.0.0") != 0) {
12602 goto bad;
12603 }
12604 } else {
12605 if (strcmp(straddr, "127.0.0.1") != 0) {
12606 goto bad;
12607 }
12608 }
12609 inet4++;
12610 break;
12611 case AF_INET6:
12612 if (strcmp(strport, "54321") != 0) {
12613 goto bad;
12614 }
12615 if (passive) {
12616 if (strcmp(straddr, "::") != 0) {
12617 goto bad;
12618 }
12619 } else {
12620 if (strcmp(straddr, "::1") != 0) {
12621 goto bad;
12622 }
12623 }
12624 inet6++;
12625 break;
12626 case AF_UNSPEC:
12627 goto bad;
12628 break;
12629 default:
12630 /* another family support? */
12631 break;
12632 }
12633 }
12634 }
12635
12636 if (!(inet4 == 0 || inet4 == 2))
12637 goto bad;
12638 if (!(inet6 == 0 || inet6 == 2))
12639 goto bad;
12640
12641 if (aitop)
12642 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012643 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012644
12645 bad:
12646 if (aitop)
12647 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012648 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012649}
12650
Martin v. Löwis11437992002-04-12 09:54:03 +000012651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012652if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012653 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012654else
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012661fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012662
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12666$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12667
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012668if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012669then
12670 if test $ipv6 = yes
12671 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012672 echo 'Fatal: You must get working getaddrinfo() function.'
12673 echo ' or you can specify "--disable-ipv6"'.
12674 exit 1
12675 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012676else
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Matthias Kloseb9621712010-04-24 17:59:49 +000012678$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012679
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012680fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012681
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012682for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012683do :
12684 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012685if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012686 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012688_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012689
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012690fi
12691done
12692
Michael W. Hudson54241132001-12-07 15:38:26 +000012693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12696$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012697if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012699else
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012701/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012702#include <sys/types.h>
12703#include <sys/time.h>
12704#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
Martin v. Löwis11437992002-04-12 09:54:03 +000012706int
12707main ()
12708{
12709if ((struct tm *) 0)
12710return 0;
12711 ;
12712 return 0;
12713}
12714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012717else
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12723$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012724if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Matthias Kloseb9621712010-04-24 17:59:49 +000012726$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727
12728fi
12729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12731$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012732if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012736/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012737#include <sys/types.h>
12738#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012739
Martin v. Löwis11437992002-04-12 09:54:03 +000012740int
12741main ()
12742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743struct tm tm;
12744 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751 ac_cv_struct_tm=time.h
12752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12758$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012759if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762
12763fi
12764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765ac_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 +000012766#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768"
Victor Stinnere0be4232011-10-25 13:06:09 +020012769if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
12771cat >>confdefs.h <<_ACEOF
12772#define HAVE_STRUCT_TM_TM_ZONE 1
12773_ACEOF
12774
12775
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012776fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012777
Martin v. Löwis11437992002-04-12 09:54:03 +000012778if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012781
12782else
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12784"
Victor Stinnere0be4232011-10-25 13:06:09 +020012785if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787else
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012789fi
12790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012792#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793_ACEOF
12794
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12796$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012797if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799else
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012801/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012802#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803#if !HAVE_DECL_TZNAME
12804extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Martin v. Löwis11437992002-04-12 09:54:03 +000012807int
12808main ()
12809{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 ;
12812 return 0;
12813}
12814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012815if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012816 ac_cv_var_tzname=yes
12817else
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012820rm -f core conftest.err conftest.$ac_objext \
12821 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12824$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012825 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012828
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012829 fi
12830fi
12831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832ac_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 +020012833if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012834
12835cat >>confdefs.h <<_ACEOF
12836#define HAVE_STRUCT_STAT_ST_RDEV 1
12837_ACEOF
12838
12839
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012840fi
12841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842ac_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 +020012843if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012844
Martin v. Löwis11437992002-04-12 09:54:03 +000012845cat >>confdefs.h <<_ACEOF
12846#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12847_ACEOF
12848
12849
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012850fi
12851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852ac_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 +020012853if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012854
12855cat >>confdefs.h <<_ACEOF
12856#define HAVE_STRUCT_STAT_ST_FLAGS 1
12857_ACEOF
12858
12859
12860fi
12861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862ac_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 +020012863if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012864
12865cat >>confdefs.h <<_ACEOF
12866#define HAVE_STRUCT_STAT_ST_GEN 1
12867_ACEOF
12868
12869
12870fi
12871
Matthias Kloseb9621712010-04-24 17:59:49 +000012872ac_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 +020012873if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012874
12875cat >>confdefs.h <<_ACEOF
12876#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12877_ACEOF
12878
12879
12880fi
12881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882ac_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 +020012883if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012884
Martin v. Löwis11437992002-04-12 09:54:03 +000012885cat >>confdefs.h <<_ACEOF
12886#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12887_ACEOF
12888
12889
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012890fi
12891
Michael W. Hudson54241132001-12-07 15:38:26 +000012892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12894$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012895if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897else
Matthias Kloseb159a552010-04-25 21:00:44 +000012898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012900/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012901#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012902int
12903main ()
12904{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 ;
12907 return 0;
12908}
12909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012910if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012911 ac_cv_header_time_altzone=yes
12912else
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917fi
12918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12920$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012924
12925fi
12926
Guido van Rossumda88dad1995-01-26 00:46:29 +000012927was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12929$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012931/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012932
12933#include <sys/types.h>
12934#include <sys/select.h>
12935#include <sys/time.h>
12936
Martin v. Löwis11437992002-04-12 09:54:03 +000012937int
12938main ()
12939{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012940;
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 ;
12942 return 0;
12943}
12944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012945if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
12947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012950 was_it_defined=yes
12951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12955$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12958$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012959if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012961else
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012963/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012964#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012965int
12966main ()
12967{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012968struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012974 ac_cv_struct_addrinfo=yes
12975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12979fi
12980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12982$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012983if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986
12987fi
12988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12990$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012991if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012995/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012996
12997# include <sys/types.h>
12998# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012999int
13000main ()
13001{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013003 ;
13004 return 0;
13005}
13006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013007if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013008 ac_cv_struct_sockaddr_storage=yes
13009else
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13013fi
13014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13016$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013017if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013020
13021fi
13022
Guido van Rossum627b2d71993-12-24 10:39:16 +000013023# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13026$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013027if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013029else
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013032$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013033int
13034main ()
13035{
13036static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013037test_array [0] = 0;
13038return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013039
13040 ;
13041 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013042}
Martin v. Löwis11437992002-04-12 09:54:03 +000013043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013044if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013045 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013046else
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13052$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013053if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013055
13056fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13059$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013060if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013062else
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013064/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013065
Martin v. Löwis11437992002-04-12 09:54:03 +000013066int
13067main ()
13068{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013069
Martin v. Löwis11437992002-04-12 09:54:03 +000013070#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013071 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013072 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013073 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075 char const *const *pcpcc;
13076 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013077 /* NEC SVR4.0.2 mips cc rejects this. */
13078 struct point {int x, y;};
13079 static struct point const zero = {0,0};
13080 /* AIX XL C 1.02.0.0 rejects this.
13081 It does not let you subtract one const X* pointer from another in
13082 an arm of an if-expression whose if-part is not a constant
13083 expression */
13084 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013085 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087 ++pcpcc;
13088 ppc = (char**) pcpcc;
13089 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013090 { /* SCO 3.2v4 cc rejects this sort of thing. */
13091 char tx;
13092 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013094
Martin v. Löwis11437992002-04-12 09:54:03 +000013095 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 }
13098 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13099 int x[] = {25, 17};
13100 const int *foo = &x[0];
13101 ++foo;
13102 }
13103 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13104 typedef const int *iptr;
13105 iptr p = 0;
13106 ++p;
13107 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013108 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013109 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013110 struct s { int j; const int *ap[3]; } bx;
13111 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 }
13113 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13114 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013116 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013118#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013119
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ;
13121 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013122}
Martin v. Löwis11437992002-04-12 09:54:03 +000013123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125 ac_cv_c_const=yes
13126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13132$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013136
13137fi
13138
Michael W. Hudson54241132001-12-07 15:38:26 +000013139
Guido van Rossumda88dad1995-01-26 00:46:29 +000013140works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13142$as_echo_n "checking for working volatile... " >&6; }
13143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013144/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013145
Martin v. Löwis11437992002-04-12 09:54:03 +000013146int
13147main ()
13148{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013149volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 ;
13151 return 0;
13152}
13153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013154if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013155 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013156else
Skip Montanaro6dead952003-09-25 14:50:04 +000013157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013159
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013160
Guido van Rossum627b2d71993-12-24 10:39:16 +000013161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13164$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013165
Guido van Rossumda88dad1995-01-26 00:46:29 +000013166works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13168$as_echo_n "checking for working signed char... " >&6; }
13169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013170/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013171
Martin v. Löwis11437992002-04-12 09:54:03 +000013172int
13173main ()
13174{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013175signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013176 ;
13177 return 0;
13178}
13179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013180if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013181 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013182else
Skip Montanaro6dead952003-09-25 14:50:04 +000013183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013185
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013186
Guido van Rossum7f43da71994-08-01 12:15:30 +000013187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13190$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013191
Guido van Rossumda88dad1995-01-26 00:46:29 +000013192have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13194$as_echo_n "checking for prototypes... " >&6; }
13195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013196/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013197int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013198int
13199main ()
13200{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013201return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013202 ;
13203 return 0;
13204}
13205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013209
Matthias Kloseb159a552010-04-25 21:00:44 +000013210 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13214$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013215
Guido van Rossumda88dad1995-01-26 00:46:29 +000013216works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13218$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013220/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013221
13222#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013223int foo(int x, ...) {
13224 va_list va;
13225 va_start(va, x);
13226 va_arg(va, int);
13227 va_arg(va, char *);
13228 va_arg(va, double);
13229 return 0;
13230}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013231
Martin v. Löwis11437992002-04-12 09:54:03 +000013232int
13233main ()
13234{
Guido van Rossum90eea071996-08-30 20:58:57 +000013235return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013236 ;
13237 return 0;
13238}
13239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013241
13242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013245 works=yes
13246
Guido van Rossum627b2d71993-12-24 10:39:16 +000013247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13250$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013251
Martin v. Löwisd6320502004-08-12 13:45:08 +000013252# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13254$as_echo_n "checking for socketpair... " >&6; }
13255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013256/* end confdefs.h. */
13257
13258#include <sys/types.h>
13259#include <sys/socket.h>
13260
13261int
13262main ()
13263{
13264void *x=socketpair
13265 ;
13266 return 0;
13267}
13268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013272
Matthias Kloseb159a552010-04-25 21:00:44 +000013273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013278
13279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013281
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013282# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13284$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013286/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013287#include <sys/types.h>
13288#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013289int
13290main ()
13291{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292struct sockaddr x;
13293x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013294 ;
13295 return 0;
13296}
13297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013298if ac_fn_c_try_compile "$LINENO"; then :
13299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13300$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013303
13304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13306$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013307
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310
Guido van Rossumda88dad1995-01-26 00:46:29 +000013311va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13313$as_echo_n "checking whether va_list is an array... " >&6; }
13314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013315/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316
13317#ifdef HAVE_STDARG_PROTOTYPES
13318#include <stdarg.h>
13319#else
13320#include <varargs.h>
13321#endif
13322
Martin v. Löwis11437992002-04-12 09:54:03 +000013323int
13324main ()
13325{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013327 ;
13328 return 0;
13329}
13330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013331if ac_fn_c_try_compile "$LINENO"; then :
13332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333else
Skip Montanaro6dead952003-09-25 14:50:04 +000013334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
Guido van Rossumda88dad1995-01-26 00:46:29 +000013338 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013339
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13343$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013345# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
13347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013349if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13354$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013355 OLD_CFLAGS=$CFLAGS
13356 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013358/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013359
13360# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Martin v. Löwis11437992002-04-12 09:54:03 +000013362int
13363main ()
13364{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013365
13366 char *name;
13367 struct hostent *he, *res;
13368 char buffer[2048];
13369 int buflen = 2048;
13370 int h_errnop;
13371
13372 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
13374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013381
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13386$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013388else
Skip Montanaro6dead952003-09-25 14:50:04 +000013389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13391$as_echo "no" >&6; }
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13393$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013395/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013397# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399int
13400main ()
13401{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013402
13403 char *name;
13404 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013405 char buffer[2048];
13406 int buflen = 2048;
13407 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013408
Matthias Kloseb159a552010-04-25 21:00:44 +000013409 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
13411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Matthias Kloseb159a552010-04-25 21:00:44 +000013420$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13423$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013425else
Skip Montanaro6dead952003-09-25 14:50:04 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13428$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13430$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13432/* end confdefs.h. */
13433
13434# include <netdb.h>
13435
13436int
13437main ()
13438{
13439
13440 char *name;
13441 struct hostent *he;
13442 struct hostent_data data;
13443
13444 (void) gethostbyname_r(name, he, &data);
13445
13446 ;
13447 return 0;
13448}
13449_ACEOF
13450if ac_fn_c_try_compile "$LINENO"; then :
13451
13452 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13453
13454
13455$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13456
13457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13458$as_echo "yes" >&6; }
13459
13460else
13461
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13463$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013473 CFLAGS=$OLD_CFLAGS
13474
13475else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 for ac_func in gethostbyname
13478do :
13479 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013480if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013482#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013483_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013485fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013486done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013489fi
13490
Michael W. Hudson54241132001-12-07 15:38:26 +000013491
13492
13493
13494
13495
13496
Guido van Rossum627b2d71993-12-24 10:39:16 +000013497# checks for system services
13498# (none yet)
13499
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013500# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013501ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013502if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013503
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013504else
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13506$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013507if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509else
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013511LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515/* Override any GCC internal prototype to avoid an error.
13516 Use char because int might match the return type of a GCC
13517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013518#ifdef __cplusplus
13519extern "C"
13520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013521char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013522int
13523main ()
13524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013531 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013535rm -f core conftest.err conftest.$ac_objext \
13536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013537LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13540$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013541if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 cat >>confdefs.h <<_ACEOF
13543#define HAVE_LIBIEEE 1
13544_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013546 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547
Guido van Rossum627b2d71993-12-24 10:39:16 +000013548fi
13549
Michael W. Hudson54241132001-12-07 15:38:26 +000013550
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013551fi
13552
Michael W. Hudson54241132001-12-07 15:38:26 +000013553
Guido van Rossum7f253911997-05-09 02:42:48 +000013554# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13556$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013559if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013561if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013562then
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13567$as_echo "yes" >&6; }
13568else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13569$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013570fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013571else
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13573$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013574fi
13575
Guido van Rossum7f253911997-05-09 02:42:48 +000013576
Guido van Rossum7f43da71994-08-01 12:15:30 +000013577# check for --with-libm=...
13578
Guido van Rossum563e7081996-09-10 18:20:48 +000013579case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013580Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013581*) LIBM=-lm
13582esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13584$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013587if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013589if test "$withval" = no
13590then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13592$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013593elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013594then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13596$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013597else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013598fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13601$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013602fi
13603
Guido van Rossum7f43da71994-08-01 12:15:30 +000013604
13605# check for --with-libc=...
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13608$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013610# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013611if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013612 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013613if test "$withval" = no
13614then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13616$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013617elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013618then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13620$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013621else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013622fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013623else
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13625$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626fi
13627
Guido van Rossum7f43da71994-08-01 12:15:30 +000013628
Stefan Krah1919b7e2012-03-21 18:25:23 +010013629# **************************************
13630# * Check for gcc x64 inline assembler *
13631# **************************************
13632
13633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13634$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13636/* end confdefs.h. */
13637
13638int
13639main ()
13640{
13641
13642 __asm__ __volatile__ ("movq %rcx, %rax");
13643
13644 ;
13645 return 0;
13646}
13647_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013648if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013649 have_gcc_asm_for_x64=yes
13650else
13651 have_gcc_asm_for_x64=no
13652fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013653rm -f core conftest.err conftest.$ac_objext \
13654 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13656$as_echo "$have_gcc_asm_for_x64" >&6; }
13657if test "$have_gcc_asm_for_x64" = yes
13658then
13659
13660$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13661
13662fi
13663
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013664# **************************************************
13665# * Check for various properties of floating point *
13666# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13669$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013670if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013671 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013672else
13673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013675 ac_cv_little_endian_double=no
13676else
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013678/* end confdefs.h. */
13679
13680#include <string.h>
13681int main() {
13682 double x = 9006104071832581.0;
13683 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13684 return 0;
13685 else
13686 return 1;
13687}
13688
13689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013690if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013691 ac_cv_little_endian_double=yes
13692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013697fi
13698
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013699fi
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13702$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013703if test "$ac_cv_little_endian_double" = yes
13704then
13705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013707
13708fi
13709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13711$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013712if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013714else
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013717 ac_cv_big_endian_double=no
13718else
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013720/* end confdefs.h. */
13721
13722#include <string.h>
13723int main() {
13724 double x = 9006104071832581.0;
13725 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13726 return 0;
13727 else
13728 return 1;
13729}
13730
13731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013732if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013733 ac_cv_big_endian_double=yes
13734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013739fi
13740
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013741fi
13742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13744$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013745if test "$ac_cv_big_endian_double" = yes
13746then
13747
Matthias Kloseb9621712010-04-24 17:59:49 +000013748$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013749
13750fi
13751
13752# Some ARM platforms use a mixed-endian representation for doubles.
13753# While Python doesn't currently have full support for these platforms
13754# (see e.g., issue 1762561), we can at least make sure that float <-> string
13755# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13757$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013758if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013760else
13761
Matthias Kloseb9621712010-04-24 17:59:49 +000013762if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013763 ac_cv_mixed_endian_double=no
13764else
Matthias Kloseb9621712010-04-24 17:59:49 +000013765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013766/* end confdefs.h. */
13767
13768#include <string.h>
13769int main() {
13770 double x = 9006104071832581.0;
13771 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13772 return 0;
13773 else
13774 return 1;
13775}
13776
13777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013778if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779 ac_cv_mixed_endian_double=yes
13780else
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785fi
13786
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013787fi
13788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13790$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013791if test "$ac_cv_mixed_endian_double" = yes
13792then
13793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013795
13796fi
13797
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013798# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013799# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013800# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013801# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013802# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013803# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013804
13805# This inline assembler syntax may also work for suncc and icc,
13806# so we try it on all platforms.
13807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13809$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013811/* end confdefs.h. */
13812
13813int
13814main ()
13815{
13816
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013817 unsigned short cw;
13818 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13819 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013820
13821 ;
13822 return 0;
13823}
13824_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013825if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013826 have_gcc_asm_for_x87=yes
13827else
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013830rm -f core conftest.err conftest.$ac_objext \
13831 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13833$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013834if test "$have_gcc_asm_for_x87" = yes
13835then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013836
Matthias Kloseb9621712010-04-24 17:59:49 +000013837$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013838
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013840
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13842$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13844/* end confdefs.h. */
13845
13846int
13847main ()
13848{
13849
13850 unsigned int fpcr;
13851 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13852 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13853
13854 ;
13855 return 0;
13856}
13857_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013858if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013859 have_gcc_asm_for_mc68881=yes
13860else
13861 have_gcc_asm_for_mc68881=no
13862fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013863rm -f core conftest.err conftest.$ac_objext \
13864 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13866$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13867if test "$have_gcc_asm_for_mc68881" = yes
13868then
13869
13870$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13871
13872fi
13873
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013874# Detect whether system arithmetic is subject to x87-style double
13875# rounding issues. The result of this test has little meaning on non
13876# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13877# mode is round-to-nearest and double rounding issues are present, and
13878# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13880$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013881# $BASECFLAGS may affect the result
13882ac_save_cc="$CC"
13883CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013884if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013885 ac_cv_x87_double_rounding=no
13886else
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013888/* end confdefs.h. */
13889
13890#include <stdlib.h>
13891#include <math.h>
13892int main() {
13893 volatile double x, y, z;
13894 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13895 x = 0.99999999999999989; /* 1-2**-53 */
13896 y = 1./x;
13897 if (y != 1.)
13898 exit(0);
13899 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13900 x = 1e16;
13901 y = 2.99999;
13902 z = x + y;
13903 if (z != 1e16+4.)
13904 exit(0);
13905 /* both tests show evidence of double rounding */
13906 exit(1);
13907}
13908
13909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013910if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013911 ac_cv_x87_double_rounding=no
13912else
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13916 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013917fi
13918
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013919CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13921$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013922if test "$ac_cv_x87_double_rounding" = yes
13923then
13924
Matthias Kloseb9621712010-04-24 17:59:49 +000013925$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013926
13927fi
13928
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013929# ************************************
13930# * Check for mathematical functions *
13931# ************************************
13932
13933LIBS_SAVE=$LIBS
13934LIBS="$LIBS $LIBM"
13935
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013936for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13937do :
13938 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13939ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013940if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013941 cat >>confdefs.h <<_ACEOF
13942#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13943_ACEOF
13944
13945fi
13946done
13947
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013948for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013949do :
13950 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13951ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013952if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013953 cat >>confdefs.h <<_ACEOF
13954#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13955_ACEOF
13956
13957fi
13958done
13959
13960ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13961"
Victor Stinnere0be4232011-10-25 13:06:09 +020013962if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013963 ac_have_decl=1
13964else
13965 ac_have_decl=0
13966fi
13967
13968cat >>confdefs.h <<_ACEOF
13969#define HAVE_DECL_ISINF $ac_have_decl
13970_ACEOF
13971ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13972"
Victor Stinnere0be4232011-10-25 13:06:09 +020013973if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013974 ac_have_decl=1
13975else
13976 ac_have_decl=0
13977fi
13978
13979cat >>confdefs.h <<_ACEOF
13980#define HAVE_DECL_ISNAN $ac_have_decl
13981_ACEOF
13982ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13983"
Victor Stinnere0be4232011-10-25 13:06:09 +020013984if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013985 ac_have_decl=1
13986else
13987 ac_have_decl=0
13988fi
13989
13990cat >>confdefs.h <<_ACEOF
13991#define HAVE_DECL_ISFINITE $ac_have_decl
13992_ACEOF
13993
13994
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013995# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13996# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13998$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013999if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014001else
14002
Matthias Kloseb9621712010-04-24 17:59:49 +000014003if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014004 ac_cv_tanh_preserves_zero_sign=no
14005else
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014007/* end confdefs.h. */
14008
14009#include <math.h>
14010#include <stdlib.h>
14011int main() {
14012 /* return 0 if either negative zeros don't exist
14013 on this platform or if negative zeros exist
14014 and tanh(-0.) == -0. */
14015 if (atan2(0., -1.) == atan2(-0., -1.) ||
14016 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14017 else exit(1);
14018}
14019
14020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014021if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014022 ac_cv_tanh_preserves_zero_sign=yes
14023else
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14027 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014028fi
14029
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014030fi
14031
Matthias Kloseb9621712010-04-24 17:59:49 +000014032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14033$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014034if test "$ac_cv_tanh_preserves_zero_sign" = yes
14035then
14036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014038
14039fi
14040
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014041if test "$ac_cv_func_log1p" = yes
14042then
14043 # On some versions of AIX, log1p(-0.) returns 0. instead of
14044 # -0. See issue #9920.
14045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14046$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014047 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014048 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014049else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014050
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014051 if test "$cross_compiling" = yes; then :
14052 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014053else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14055/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014056
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014057 #include <math.h>
14058 #include <stdlib.h>
14059 int main() {
14060 /* Fail if the signs of log1p(-0.) and -0. can be
14061 distinguished. */
14062 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14063 return 0;
14064 else
14065 return 1;
14066 }
14067
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014068_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014069if ac_fn_c_try_run "$LINENO"; then :
14070 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014071else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014072 ac_cv_log1p_drops_zero_sign=yes
14073fi
14074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14075 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014076fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014077
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014078fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014079
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14081$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14082fi
14083if test "$ac_cv_log1p_drops_zero_sign" = yes
14084then
14085
14086$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14087
14088fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014089
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014090LIBS=$LIBS_SAVE
14091
Mark Dickinsona614f042009-11-28 12:48:43 +000014092# For multiprocessing module, check that sem_open
14093# actually works. For FreeBSD versions <= 7.2,
14094# the kernel module that provides POSIX semaphores
14095# isn't loaded by default, so an attempt to call
14096# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14098$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014099if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014101else
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014103 ac_cv_posix_semaphores_enabled=yes
14104else
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014106/* end confdefs.h. */
14107
14108#include <unistd.h>
14109#include <fcntl.h>
14110#include <stdio.h>
14111#include <semaphore.h>
14112#include <sys/stat.h>
14113
14114int main(void) {
14115 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14116 if (a == SEM_FAILED) {
14117 perror("sem_open");
14118 return 1;
14119 }
14120 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014121 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014122 return 0;
14123}
14124
14125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014126if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014127 ac_cv_posix_semaphores_enabled=yes
14128else
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14132 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014133fi
14134
14135
Mark Dickinsona614f042009-11-28 12:48:43 +000014136fi
14137
Matthias Kloseb9621712010-04-24 17:59:49 +000014138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14139$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014140if test $ac_cv_posix_semaphores_enabled = no
14141then
14142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014144
14145fi
14146
Mark Dickinson10683072009-04-18 21:18:19 +000014147# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14149$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014150if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014152else
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014154 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014155else
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014157/* end confdefs.h. */
14158
14159#include <unistd.h>
14160#include <fcntl.h>
14161#include <stdio.h>
14162#include <semaphore.h>
14163#include <sys/stat.h>
14164
14165int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014166 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014167 int count;
14168 int res;
14169 if(a==SEM_FAILED){
14170 perror("sem_open");
14171 return 1;
14172
14173 }
14174 res = sem_getvalue(a, &count);
14175 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014176 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014177 return res==-1 ? 1 : 0;
14178}
14179
Mark Dickinson10683072009-04-18 21:18:19 +000014180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014181if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014188fi
14189
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014191fi
14192
Matthias Kloseb9621712010-04-24 17:59:49 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14194$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014195if test $ac_cv_broken_sem_getvalue = yes
14196then
14197
Matthias Kloseb9621712010-04-24 17:59:49 +000014198$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014199
14200fi
14201
Mark Dickinsonbd792642009-03-18 20:06:12 +000014202# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14204$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014205# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014206if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014207 enableval=$enable_big_digits; case $enable_big_digits in
14208yes)
14209 enable_big_digits=30 ;;
14210no)
14211 enable_big_digits=15 ;;
1421215|30)
14213 ;;
14214*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014215 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 +000014216esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14218$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014219
14220cat >>confdefs.h <<_ACEOF
14221#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14222_ACEOF
14223
14224
14225else
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14227$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014228fi
14229
14230
Guido van Rossumef2255b2000-03-10 22:30:29 +000014231# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014232ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014233if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014234
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014237
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014238 wchar_h="yes"
14239
Guido van Rossumef2255b2000-03-10 22:30:29 +000014240else
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014242
14243fi
14244
Michael W. Hudson54241132001-12-07 15:38:26 +000014245
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014247# determine wchar_t size
14248if test "$wchar_h" = yes
14249then
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14252# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14253# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14255$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014256if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014258else
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14260"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014261
Martin v. Löwis11437992002-04-12 09:54:03 +000014262else
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 if test "$ac_cv_type_wchar_t" = yes; then
14264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014266as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014267See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268 else
14269 ac_cv_sizeof_wchar_t=0
14270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014272
Martin v. Löwis11437992002-04-12 09:54:03 +000014273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14275$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014276
14277
14278
Martin v. Löwis11437992002-04-12 09:54:03 +000014279cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014280#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014281_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014282
Michael W. Hudson54241132001-12-07 15:38:26 +000014283
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014284fi
14285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14287$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014288have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014290/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014291
14292#include <tcl.h>
14293#if TCL_UTF_MAX != 6
14294# error "NOT UCS4_TCL"
14295#endif
14296int
14297main ()
14298{
14299
14300 ;
14301 return 0;
14302}
14303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014305
14306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014308
14309 have_ucs4_tcl=yes
14310
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14314$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014315
Skip Montanaro6dead952003-09-25 14:50:04 +000014316# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014317if test "$wchar_h" = yes
14318then
14319 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14321$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014322 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014324else
14325
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014327 ac_cv_wchar_t_signed=yes
14328else
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014330/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014331
14332 #include <wchar.h>
14333 int main()
14334 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014335 /* Success: exit code 0 */
14336 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014337 }
14338
14339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014340if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014341 ac_cv_wchar_t_signed=yes
14342else
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14346 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014347fi
14348
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014349fi
14350
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14352$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353fi
14354
Georg Brandl52d168a2008-01-07 18:10:24 +000014355# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014356if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014357 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014358then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014359 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014360
Matthias Kloseb9621712010-04-24 17:59:49 +000014361$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Georg Brandl52d168a2008-01-07 18:10:24 +000014363else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014364 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014365fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14367$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014368
14369# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14371$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014372if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014374else
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 ac_cv_c_bigendian=unknown
14376 # See if we're dealing with a universal compiler.
14377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14378/* end confdefs.h. */
14379#ifndef __APPLE_CC__
14380 not a universal capable compiler
14381 #endif
14382 typedef int dummy;
14383
Skip Montanaro6dead952003-09-25 14:50:04 +000014384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014385if ac_fn_c_try_compile "$LINENO"; then :
14386
14387 # Check for potential -arch flags. It is not universal unless
14388 # there are at least two -arch flags with different values.
14389 ac_arch=
14390 ac_prev=
14391 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14392 if test -n "$ac_prev"; then
14393 case $ac_word in
14394 i?86 | x86_64 | ppc | ppc64)
14395 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14396 ac_arch=$ac_word
14397 else
14398 ac_cv_c_bigendian=universal
14399 break
14400 fi
14401 ;;
14402 esac
14403 ac_prev=
14404 elif test "x$ac_word" = "x-arch"; then
14405 ac_prev=arch
14406 fi
14407 done
14408fi
14409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14410 if test $ac_cv_c_bigendian = unknown; then
14411 # See if sys/param.h defines the BYTE_ORDER macro.
14412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014413/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014414#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417int
14418main ()
14419{
Matthias Kloseb9621712010-04-24 17:59:49 +000014420#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14421 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14422 && LITTLE_ENDIAN)
14423 bogus endian macros
14424 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
14426 ;
14427 return 0;
14428}
14429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014430if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014431 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014433/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014434#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437int
14438main ()
14439{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014440#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 not big endian
14442 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
14444 ;
14445 return 0;
14446}
14447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014448if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014449 ac_cv_c_bigendian=yes
14450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014454fi
14455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14456 fi
14457 if test $ac_cv_c_bigendian = unknown; then
14458 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014460/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014461#include <limits.h>
14462
Martin v. Löwis11437992002-04-12 09:54:03 +000014463int
14464main ()
14465{
Matthias Kloseb9621712010-04-24 17:59:49 +000014466#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14467 bogus endian macros
14468 #endif
14469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 ;
14471 return 0;
14472}
14473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014474if ac_fn_c_try_compile "$LINENO"; then :
14475 # It does; now see whether it defined to _BIG_ENDIAN or not.
14476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14477/* end confdefs.h. */
14478#include <limits.h>
14479
14480int
14481main ()
14482{
14483#ifndef _BIG_ENDIAN
14484 not big endian
14485 #endif
14486
14487 ;
14488 return 0;
14489}
14490_ACEOF
14491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014493else
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14497fi
14498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14499 fi
14500 if test $ac_cv_c_bigendian = unknown; then
14501 # Compile a test program.
14502 if test "$cross_compiling" = yes; then :
14503 # Try to guess by grepping values from an object file.
14504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14505/* end confdefs.h. */
14506short int ascii_mm[] =
14507 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14508 short int ascii_ii[] =
14509 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14510 int use_ascii (int i) {
14511 return ascii_mm[i] + ascii_ii[i];
14512 }
14513 short int ebcdic_ii[] =
14514 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14515 short int ebcdic_mm[] =
14516 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14517 int use_ebcdic (int i) {
14518 return ebcdic_mm[i] + ebcdic_ii[i];
14519 }
14520 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014521
Matthias Kloseb9621712010-04-24 17:59:49 +000014522int
14523main ()
14524{
14525return use_ascii (foo) == use_ebcdic (foo);
14526 ;
14527 return 0;
14528}
14529_ACEOF
14530if ac_fn_c_try_compile "$LINENO"; then :
14531 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14532 ac_cv_c_bigendian=yes
14533 fi
14534 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14535 if test "$ac_cv_c_bigendian" = unknown; then
14536 ac_cv_c_bigendian=no
14537 else
14538 # finding both strings is unlikely to happen, but who knows?
14539 ac_cv_c_bigendian=unknown
14540 fi
14541 fi
14542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014544else
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014546/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014548int
14549main ()
14550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014551
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 /* Are we little or big endian? From Harbison&Steele. */
14553 union
14554 {
14555 long int l;
14556 char c[sizeof (long int)];
14557 } u;
14558 u.l = 1;
14559 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560
14561 ;
14562 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014563}
Martin v. Löwis11437992002-04-12 09:54:03 +000014564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014565if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014566 ac_cv_c_bigendian=no
14567else
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14577$as_echo "$ac_cv_c_bigendian" >&6; }
14578 case $ac_cv_c_bigendian in #(
14579 yes)
14580 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14581;; #(
14582 no)
14583 ;; #(
14584 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014587
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 ;; #(
14589 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014590 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014591 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014593
Michael W. Hudson54241132001-12-07 15:38:26 +000014594
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014595# ABI version string for Python extension modules. This appears between the
14596# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14597# from the following attributes which affect the ABI of this Python build (in
14598# this order):
14599#
14600# * The Python implementation (always 'cpython-' for us)
14601# * The major and minor version numbers
14602# * --with-pydebug (adds a 'd')
14603# * --with-pymalloc (adds a 'm')
14604# * --with-wide-unicode (adds a 'u')
14605#
14606# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014607# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14608# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014609
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14611$as_echo_n "checking ABIFLAGS... " >&6; }
14612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14613$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14615$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014616SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14618$as_echo "$SOABI" >&6; }
14619
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014620
14621case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014622 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014623 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14624 *)
14625 EXT_SUFFIX=${SHLIB_SUFFIX};;
14626esac
14627
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14629$as_echo_n "checking LDVERSION... " >&6; }
14630LDVERSION='$(VERSION)$(ABIFLAGS)'
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14632$as_echo "$LDVERSION" >&6; }
14633
doko@python.org87421192013-01-26 11:39:31 +010014634
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014635LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014636
14637
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014638# Check whether right shifting a negative integer extends the sign bit
14639# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14641$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014642if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014644else
Martin v. Löwis11437992002-04-12 09:54:03 +000014645
Matthias Kloseb9621712010-04-24 17:59:49 +000014646if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014647 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014648else
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014650/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014651
14652int main()
14653{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014654 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014655}
14656
Martin v. Löwis11437992002-04-12 09:54:03 +000014657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014658if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014659 ac_cv_rshift_extends_sign=yes
14660else
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14664 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014665fi
14666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667fi
14668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14670$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014671if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014672then
Martin v. Löwis11437992002-04-12 09:54:03 +000014673
Matthias Kloseb9621712010-04-24 17:59:49 +000014674$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014675
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014676fi
14677
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014678# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14680$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014681if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014683else
Martin v. Löwis11437992002-04-12 09:54:03 +000014684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014686/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014687#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014688int
14689main ()
14690{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014691
14692 FILE *f = fopen("/dev/null", "r");
14693 flockfile(f);
14694 getc_unlocked(f);
14695 funlockfile(f);
14696
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 ;
14698 return 0;
14699}
14700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014701if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014702 ac_cv_have_getc_unlocked=yes
14703else
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 ac_cv_have_getc_unlocked=no
14705fi
14706rm -f core conftest.err conftest.$ac_objext \
14707 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709
Matthias Kloseb9621712010-04-24 17:59:49 +000014710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14711$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014712if test "$ac_cv_have_getc_unlocked" = yes
14713then
Martin v. Löwis11437992002-04-12 09:54:03 +000014714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014716
14717fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014718
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014719# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014720# save the value of LIBS so we don't actually link Python with readline
14721LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014722
Gregory P. Smith18820942008-09-07 06:24:49 +000014723# On some systems we need to link readline to a termcap compatible
14724# library. NOTE: Keep the precedence of listed libraries synchronised
14725# with setup.py.
14726py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14728$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014729for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014730 if test -z "$py_libtermcap"; then
14731 READLINE_LIBS="-lreadline"
14732 else
14733 READLINE_LIBS="-lreadline -l$py_libtermcap"
14734 fi
14735 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014737/* end confdefs.h. */
14738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739/* Override any GCC internal prototype to avoid an error.
14740 Use char because int might match the return type of a GCC
14741 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014742#ifdef __cplusplus
14743extern "C"
14744#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014745char readline ();
14746int
14747main ()
14748{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014750 ;
14751 return 0;
14752}
14753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014755 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014757rm -f core conftest.err conftest.$ac_objext \
14758 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014759 if test $py_cv_lib_readline = yes; then
14760 break
14761 fi
14762done
14763# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14764#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014765if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14767$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014768else
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14770$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014773
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014774fi
14775
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014776# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14778$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014779if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014781else
14782 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014783LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014785/* end confdefs.h. */
14786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787/* Override any GCC internal prototype to avoid an error.
14788 Use char because int might match the return type of a GCC
14789 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014790#ifdef __cplusplus
14791extern "C"
14792#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014793char rl_callback_handler_install ();
14794int
14795main ()
14796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014798 ;
14799 return 0;
14800}
14801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014802if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014803 ac_cv_lib_readline_rl_callback_handler_install=yes
14804else
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014807rm -f core conftest.err conftest.$ac_objext \
14808 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014809LIBS=$ac_check_lib_save_LIBS
14810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14812$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014813if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014814
Matthias Kloseb9621712010-04-24 17:59:49 +000014815$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014816
14817fi
14818
14819
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014820# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014822/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014823#include <readline/readline.h>
14824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014825if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014826 have_readline=yes
14827else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014828 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014829
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014830fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014831rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014832if test $have_readline = yes
14833then
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014835/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014836#include <readline/readline.h>
14837
14838_ACEOF
14839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014841
Matthias Kloseb9621712010-04-24 17:59:49 +000014842$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014843
14844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014845rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014846
Matthias Kloseb9621712010-04-24 17:59:49 +000014847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014848/* end confdefs.h. */
14849#include <readline/readline.h>
14850
14851_ACEOF
14852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014856
14857fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014858rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014859
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014860fi
14861
Martin v. Löwis0daad592001-09-30 21:09:59 +000014862# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14864$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014865if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014867else
Martin v. Löwis11437992002-04-12 09:54:03 +000014868 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014869LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873/* Override any GCC internal prototype to avoid an error.
14874 Use char because int might match the return type of a GCC
14875 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014876#ifdef __cplusplus
14877extern "C"
14878#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014879char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014880int
14881main ()
14882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014883return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 ;
14885 return 0;
14886}
14887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014888if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014889 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014890else
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014893rm -f core conftest.err conftest.$ac_objext \
14894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014895LIBS=$ac_check_lib_save_LIBS
14896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14898$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014899if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014900
Matthias Kloseb9621712010-04-24 17:59:49 +000014901$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014902
Martin v. Löwis0daad592001-09-30 21:09:59 +000014903fi
14904
Michael W. Hudson54241132001-12-07 15:38:26 +000014905
Thomas Wouters89d996e2007-09-08 17:39:28 +000014906# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14908$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014909if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014911else
14912 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014913LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014915/* end confdefs.h. */
14916
14917/* Override any GCC internal prototype to avoid an error.
14918 Use char because int might match the return type of a GCC
14919 builtin and then its argument prototype would still apply. */
14920#ifdef __cplusplus
14921extern "C"
14922#endif
14923char rl_completion_display_matches_hook ();
14924int
14925main ()
14926{
14927return rl_completion_display_matches_hook ();
14928 ;
14929 return 0;
14930}
14931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014932if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014933 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14934else
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014937rm -f core conftest.err conftest.$ac_objext \
14938 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014939LIBS=$ac_check_lib_save_LIBS
14940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14942$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014943if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014944
Matthias Kloseb9621712010-04-24 17:59:49 +000014945$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014946
14947fi
14948
14949
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014950# also in 4.0, but not in editline
14951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14952$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14953if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14954 $as_echo_n "(cached) " >&6
14955else
14956 ac_check_lib_save_LIBS=$LIBS
14957LIBS="-lreadline $READLINE_LIBS $LIBS"
14958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14959/* end confdefs.h. */
14960
14961/* Override any GCC internal prototype to avoid an error.
14962 Use char because int might match the return type of a GCC
14963 builtin and then its argument prototype would still apply. */
14964#ifdef __cplusplus
14965extern "C"
14966#endif
14967char rl_resize_terminal ();
14968int
14969main ()
14970{
14971return rl_resize_terminal ();
14972 ;
14973 return 0;
14974}
14975_ACEOF
14976if ac_fn_c_try_link "$LINENO"; then :
14977 ac_cv_lib_readline_rl_resize_terminal=yes
14978else
14979 ac_cv_lib_readline_rl_resize_terminal=no
14980fi
14981rm -f core conftest.err conftest.$ac_objext \
14982 conftest$ac_exeext conftest.$ac_ext
14983LIBS=$ac_check_lib_save_LIBS
14984fi
14985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14986$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14987if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14988
14989$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14990
14991fi
14992
14993
Martin v. Löwis0daad592001-09-30 21:09:59 +000014994# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14996$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014997if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014999else
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015001LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005/* Override any GCC internal prototype to avoid an error.
15006 Use char because int might match the return type of a GCC
15007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015008#ifdef __cplusplus
15009extern "C"
15010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015011char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015012int
15013main ()
15014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ;
15017 return 0;
15018}
15019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015020if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015022else
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015025rm -f core conftest.err conftest.$ac_objext \
15026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015027LIBS=$ac_check_lib_save_LIBS
15028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15030$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015031if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015034
Guido van Rossum353ae582001-07-10 16:45:32 +000015035fi
15036
Jack Jansendd19cf82001-12-06 22:36:17 +000015037
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015038# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015040/* end confdefs.h. */
15041#include <readline/readline.h>
15042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015043if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015044 have_readline=yes
15045else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015046 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015047
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015048fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015049rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015050if test $have_readline = yes
15051then
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015053/* end confdefs.h. */
15054#include <readline/readline.h>
15055
15056_ACEOF
15057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015059
Matthias Kloseb9621712010-04-24 17:59:49 +000015060$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015061
15062fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015063rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015064
15065fi
15066
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15068$as_echo_n "checking for append_history in -lreadline... " >&6; }
15069if ${ac_cv_lib_readline_append_history+:} false; then :
15070 $as_echo_n "(cached) " >&6
15071else
15072 ac_check_lib_save_LIBS=$LIBS
15073LIBS="-lreadline $READLINE_LIBS $LIBS"
15074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15075/* end confdefs.h. */
15076
15077/* Override any GCC internal prototype to avoid an error.
15078 Use char because int might match the return type of a GCC
15079 builtin and then its argument prototype would still apply. */
15080#ifdef __cplusplus
15081extern "C"
15082#endif
15083char append_history ();
15084int
15085main ()
15086{
15087return append_history ();
15088 ;
15089 return 0;
15090}
15091_ACEOF
15092if ac_fn_c_try_link "$LINENO"; then :
15093 ac_cv_lib_readline_append_history=yes
15094else
15095 ac_cv_lib_readline_append_history=no
15096fi
15097rm -f core conftest.err conftest.$ac_objext \
15098 conftest$ac_exeext conftest.$ac_ext
15099LIBS=$ac_check_lib_save_LIBS
15100fi
15101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15102$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15103if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15104
15105$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15106
15107fi
15108
15109
Martin v. Löwis82bca632006-02-10 20:49:30 +000015110# End of readline checks: restore LIBS
15111LIBS=$LIBS_no_readline
15112
Matthias Kloseb9621712010-04-24 17:59:49 +000015113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15114$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015115if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015117else
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
Matthias Kloseb9621712010-04-24 17:59:49 +000015119if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015120 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015121else
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015123/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015124
15125int main()
15126{
15127 int val1 = nice(1);
15128 if (val1 != -1 && val1 == nice(2))
15129 exit(0);
15130 exit(1);
15131}
15132
Martin v. Löwis11437992002-04-12 09:54:03 +000015133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015134if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015135 ac_cv_broken_nice=yes
15136else
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015141fi
15142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143fi
15144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15146$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015147if test "$ac_cv_broken_nice" = yes
15148then
Martin v. Löwis11437992002-04-12 09:54:03 +000015149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015151
15152fi
15153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15155$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015156if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015160 ac_cv_broken_poll=no
15161else
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015163/* end confdefs.h. */
15164
15165#include <poll.h>
15166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015167int main()
15168{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015169 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015170 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015171
15172 close (42);
15173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015174 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015175 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015176 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015177 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015178 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015179 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015180 return 1;
15181}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015182
15183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015184if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015185 ac_cv_broken_poll=yes
15186else
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015193fi
15194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15196$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015197if test "$ac_cv_broken_poll" = yes
15198then
15199
Matthias Kloseb9621712010-04-24 17:59:49 +000015200$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015201
15202fi
15203
Brett Cannon43802422005-02-10 20:48:03 +000015204# 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 +000015205# (which is not required by ISO C or UNIX spec) and/or if we support
15206# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015207ac_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 +000015208#include <$ac_cv_struct_tm>
15209
Matthias Kloseb9621712010-04-24 17:59:49 +000015210"
Victor Stinnere0be4232011-10-25 13:06:09 +020015211if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015212
15213cat >>confdefs.h <<_ACEOF
15214#define HAVE_STRUCT_TM_TM_ZONE 1
15215_ACEOF
15216
15217
15218fi
15219
15220if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15221
Matthias Kloseb9621712010-04-24 17:59:49 +000015222$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015223
15224else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15226"
Victor Stinnere0be4232011-10-25 13:06:09 +020015227if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229else
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231fi
15232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015234#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235_ACEOF
15236
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15238$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015239if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015240 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015241else
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015243/* end confdefs.h. */
15244#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245#if !HAVE_DECL_TZNAME
15246extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015247#endif
15248
15249int
15250main ()
15251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015253 ;
15254 return 0;
15255}
15256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015257if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015258 ac_cv_var_tzname=yes
15259else
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015262rm -f core conftest.err conftest.$ac_objext \
15263 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15266$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015267 if test $ac_cv_var_tzname = yes; then
15268
Matthias Kloseb9621712010-04-24 17:59:49 +000015269$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015270
15271 fi
15272fi
15273
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015274
Martin v. Löwis1d459062005-03-14 21:23:33 +000015275# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15277$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015278if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015280else
15281
Matthias Kloseb9621712010-04-24 17:59:49 +000015282if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015283 ac_cv_working_tzset=no
15284else
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015286/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015287
15288#include <stdlib.h>
15289#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015290#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015291
15292#if HAVE_TZNAME
15293extern char *tzname[];
15294#endif
15295
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015296int main()
15297{
Brett Cannon18367812003-09-19 00:59:16 +000015298 /* Note that we need to ensure that not only does tzset(3)
15299 do 'something' with localtime, but it works as documented
15300 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015301 This includes making sure that tzname is set properly if
15302 tm->tm_zone does not exist since it is the alternative way
15303 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015304
15305 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015306 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015307 */
15308
Martin v. Löwis1d459062005-03-14 21:23:33 +000015309 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015310 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15311
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015312 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015313 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015314 if (localtime(&groundhogday)->tm_hour != 0)
15315 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015316#if HAVE_TZNAME
15317 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15318 if (strcmp(tzname[0], "UTC") ||
15319 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15320 exit(1);
15321#endif
Brett Cannon18367812003-09-19 00:59:16 +000015322
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015323 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015324 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015325 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015326 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015327#if HAVE_TZNAME
15328 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15329 exit(1);
15330#endif
Brett Cannon18367812003-09-19 00:59:16 +000015331
15332 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15333 tzset();
15334 if (localtime(&groundhogday)->tm_hour != 11)
15335 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015336#if HAVE_TZNAME
15337 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15338 exit(1);
15339#endif
15340
15341#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015342 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15343 exit(1);
15344 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15345 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015346#endif
Brett Cannon18367812003-09-19 00:59:16 +000015347
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015348 exit(0);
15349}
15350
15351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015352if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015353 ac_cv_working_tzset=yes
15354else
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15358 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015359fi
15360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361fi
15362
Matthias Kloseb9621712010-04-24 17:59:49 +000015363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15364$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015365if test "$ac_cv_working_tzset" = yes
15366then
15367
Matthias Kloseb9621712010-04-24 17:59:49 +000015368$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015369
15370fi
15371
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015372# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15374$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015375if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015377else
Matthias Kloseb9621712010-04-24 17:59:49 +000015378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015379/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015380#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015381int
15382main ()
15383{
15384
15385struct stat st;
15386st.st_mtim.tv_nsec = 1;
15387
15388 ;
15389 return 0;
15390}
15391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015393 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15398fi
15399
Matthias Kloseb9621712010-04-24 17:59:49 +000015400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15401$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015402if test "$ac_cv_stat_tv_nsec" = yes
15403then
15404
Matthias Kloseb9621712010-04-24 17:59:49 +000015405$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015406
15407fi
15408
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015409# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15411$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015412if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015414else
Matthias Kloseb9621712010-04-24 17:59:49 +000015415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015416/* end confdefs.h. */
15417#include <sys/stat.h>
15418int
15419main ()
15420{
15421
15422struct stat st;
15423st.st_mtimespec.tv_nsec = 1;
15424
15425 ;
15426 return 0;
15427}
15428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015430 ac_cv_stat_tv_nsec2=yes
15431else
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15435fi
15436
Matthias Kloseb9621712010-04-24 17:59:49 +000015437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15438$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015439if test "$ac_cv_stat_tv_nsec2" = yes
15440then
15441
Matthias Kloseb9621712010-04-24 17:59:49 +000015442$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015443
15444fi
15445
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015446# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015447ac_save_cppflags="$CPPFLAGS"
15448CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015449
15450for ac_header in curses.h ncurses.h
15451do :
15452 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15453ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15454if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15455 cat >>confdefs.h <<_ACEOF
15456#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15457_ACEOF
15458
15459fi
15460
15461done
15462
15463
15464# On Solaris, term.h requires curses.h
15465for ac_header in term.h
15466do :
15467 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15468#ifdef HAVE_CURSES_H
15469#include <curses.h>
15470#endif
15471
15472"
15473if test "x$ac_cv_header_term_h" = xyes; then :
15474 cat >>confdefs.h <<_ACEOF
15475#define HAVE_TERM_H 1
15476_ACEOF
15477
15478fi
15479
15480done
15481
15482
Jack Jansen666b1e72001-10-31 12:11:48 +000015483# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15485$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015486if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015487 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015488else
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015490/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015491#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015492int
15493main ()
15494{
Jack Jansen666b1e72001-10-31 12:11:48 +000015495
15496 int rtn;
15497 rtn = mvwdelch(0,0,0);
15498
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 ;
15500 return 0;
15501}
15502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015503if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015504 ac_cv_mvwdelch_is_expression=yes
15505else
Matthias Kloseb9621712010-04-24 17:59:49 +000015506 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15509fi
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15512$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015513
15514if test "$ac_cv_mvwdelch_is_expression" = yes
15515then
Martin v. Löwis11437992002-04-12 09:54:03 +000015516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015518
15519fi
15520
Matthias Kloseb9621712010-04-24 17:59:49 +000015521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15522$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015523if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015525else
Matthias Kloseb9621712010-04-24 17:59:49 +000015526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015527/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015528#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015529int
15530main ()
15531{
Jack Jansen666b1e72001-10-31 12:11:48 +000015532
15533 WINDOW *w;
15534 w->_flags = 0;
15535
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 ;
15537 return 0;
15538}
15539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015540if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015541 ac_cv_window_has_flags=yes
15542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15546fi
15547
Matthias Kloseb9621712010-04-24 17:59:49 +000015548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15549$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015550
Jack Jansen666b1e72001-10-31 12:11:48 +000015551
15552if test "$ac_cv_window_has_flags" = yes
15553then
Martin v. Löwis11437992002-04-12 09:54:03 +000015554
Matthias Kloseb9621712010-04-24 17:59:49 +000015555$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015556
15557fi
15558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15560$as_echo_n "checking for is_term_resized... " >&6; }
15561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015562/* end confdefs.h. */
15563#include <curses.h>
15564int
15565main ()
15566{
15567void *x=is_term_resized
15568 ;
15569 return 0;
15570}
15571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015575
Matthias Kloseb159a552010-04-25 21:00:44 +000015576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015577$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015578else
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15580$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015581
15582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15586$as_echo_n "checking for resize_term... " >&6; }
15587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015588/* end confdefs.h. */
15589#include <curses.h>
15590int
15591main ()
15592{
15593void *x=resize_term
15594 ;
15595 return 0;
15596}
15597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015598if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015599
Matthias Kloseb9621712010-04-24 17:59:49 +000015600$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015601
Matthias Kloseb159a552010-04-25 21:00:44 +000015602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015603$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015604else
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15606$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015607
15608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15610
Matthias Kloseb9621712010-04-24 17:59:49 +000015611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15612$as_echo_n "checking for resizeterm... " >&6; }
15613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015614/* end confdefs.h. */
15615#include <curses.h>
15616int
15617main ()
15618{
15619void *x=resizeterm
15620 ;
15621 return 0;
15622}
15623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015624if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015627
Matthias Kloseb159a552010-04-25 21:00:44 +000015628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015629$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15632$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015633
15634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015636# last curses configure check
15637CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015638
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15640$as_echo "$as_me: checking for device files" >&6;}
15641
15642if test "x$cross_compiling" = xyes; then
15643 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15645$as_echo_n "checking for /dev/ptmx... " >&6; }
15646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15647$as_echo "not set" >&6; }
15648 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15649 fi
15650 if test "${ac_cv_file__dev_ptc+set}" != set; then
15651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15652$as_echo_n "checking for /dev/ptc... " >&6; }
15653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15654$as_echo "not set" >&6; }
15655 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15656 fi
15657fi
15658
Matthias Kloseb9621712010-04-24 17:59:49 +000015659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15660$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015661if ${ac_cv_file__dev_ptmx+:} false; then :
15662 $as_echo_n "(cached) " >&6
15663else
15664 test "$cross_compiling" = yes &&
15665 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15666if test -r "/dev/ptmx"; then
15667 ac_cv_file__dev_ptmx=yes
15668else
15669 ac_cv_file__dev_ptmx=no
15670fi
15671fi
15672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15673$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15674if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015675
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015676fi
15677
15678if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015681
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15684$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015685if ${ac_cv_file__dev_ptc+:} false; then :
15686 $as_echo_n "(cached) " >&6
15687else
15688 test "$cross_compiling" = yes &&
15689 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15690if test -r "/dev/ptc"; then
15691 ac_cv_file__dev_ptc=yes
15692else
15693 ac_cv_file__dev_ptc=no
15694fi
15695fi
15696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15697$as_echo "$ac_cv_file__dev_ptc" >&6; }
15698if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015699
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015700fi
15701
15702if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015703
Matthias Kloseb9621712010-04-24 17:59:49 +000015704$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015705
Neal Norwitz865400f2003-03-21 01:42:58 +000015706fi
15707
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015708if test "$have_long_long" = yes
15709then
Matthias Kloseb9621712010-04-24 17:59:49 +000015710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15711$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015712 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015716 ac_cv_have_long_long_format="cross -- assuming no"
15717 if test x$GCC = xyes; then
15718 save_CFLAGS=$CFLAGS
15719 CFLAGS="$CFLAGS -Werror -Wformat"
15720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15721/* end confdefs.h. */
15722
15723 #include <stdio.h>
15724 #include <stddef.h>
15725
15726int
15727main ()
15728{
15729
15730 char *buffer;
15731 sprintf(buffer, "%lld", (long long)123);
15732 sprintf(buffer, "%lld", (long long)-123);
15733 sprintf(buffer, "%llu", (unsigned long long)123);
15734
15735 ;
15736 return 0;
15737}
15738_ACEOF
15739if ac_fn_c_try_compile "$LINENO"; then :
15740 ac_cv_have_long_long_format=yes
15741
15742fi
15743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15744 CFLAGS=$save_CFLAGS
15745 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015746else
Matthias Kloseb9621712010-04-24 17:59:49 +000015747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015748/* end confdefs.h. */
15749
15750 #include <stdio.h>
15751 #include <stddef.h>
15752 #include <string.h>
15753
15754 #ifdef HAVE_SYS_TYPES_H
15755 #include <sys/types.h>
15756 #endif
15757
15758 int main()
15759 {
15760 char buffer[256];
15761
15762 if (sprintf(buffer, "%lld", (long long)123) < 0)
15763 return 1;
15764 if (strcmp(buffer, "123"))
15765 return 1;
15766
15767 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15768 return 1;
15769 if (strcmp(buffer, "-123"))
15770 return 1;
15771
15772 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15773 return 1;
15774 if (strcmp(buffer, "123"))
15775 return 1;
15776
15777 return 0;
15778 }
15779
15780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015781if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015782 ac_cv_have_long_long_format=yes
15783else
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15787 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015788fi
15789
15790
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015791fi
15792
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15794$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015795fi
15796
Mark Dickinson89d7d412009-12-31 20:50:59 +000015797if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015798then
15799
Matthias Kloseb9621712010-04-24 17:59:49 +000015800$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015801
15802fi
15803
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015804if test $ac_sys_system = Darwin
15805then
15806 LIBS="$LIBS -framework CoreFoundation"
15807fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015808
Matthias Kloseb9621712010-04-24 17:59:49 +000015809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15810$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015811if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015813else
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015815 ac_cv_have_size_t_format="cross -- assuming yes"
15816
Thomas Wouters477c8d52006-05-27 19:21:47 +000015817else
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015819/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015820
Thomas Wouters477c8d52006-05-27 19:21:47 +000015821#include <stdio.h>
15822#include <stddef.h>
15823#include <string.h>
15824
Christian Heimes2c181612007-12-17 20:04:13 +000015825#ifdef HAVE_SYS_TYPES_H
15826#include <sys/types.h>
15827#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015828
15829#ifdef HAVE_SSIZE_T
15830typedef ssize_t Py_ssize_t;
15831#elif SIZEOF_VOID_P == SIZEOF_LONG
15832typedef long Py_ssize_t;
15833#else
15834typedef int Py_ssize_t;
15835#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015836
Christian Heimes2c181612007-12-17 20:04:13 +000015837int main()
15838{
15839 char buffer[256];
15840
Thomas Wouters477c8d52006-05-27 19:21:47 +000015841 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15842 return 1;
15843
Thomas Wouters89f507f2006-12-13 04:49:30 +000015844 if (strcmp(buffer, "123"))
15845 return 1;
15846
15847 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15848 return 1;
15849
15850 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015851 return 1;
15852
15853 return 0;
15854}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015855
Thomas Wouters477c8d52006-05-27 19:21:47 +000015856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015857if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015858 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015859else
Matthias Kloseb9621712010-04-24 17:59:49 +000015860 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015862rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15863 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015864fi
15865
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15868$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015869if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015870
Matthias Kloseb9621712010-04-24 17:59:49 +000015871$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015872
15873fi
15874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015876#ifdef HAVE_SYS_TYPES_H
15877#include <sys/types.h>
15878#endif
15879#ifdef HAVE_SYS_SOCKET_H
15880#include <sys/socket.h>
15881#endif
15882
Matthias Kloseb9621712010-04-24 17:59:49 +000015883"
Victor Stinnere0be4232011-10-25 13:06:09 +020015884if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015887
Matthias Kloseb9621712010-04-24 17:59:49 +000015888$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015889
15890fi
15891
Michael W. Hudson54241132001-12-07 15:38:26 +000015892
Matthias Kloseb9621712010-04-24 17:59:49 +000015893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15894$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015895if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015896 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015897else
Matthias Kloseb9621712010-04-24 17:59:49 +000015898 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015899 ac_cv_broken_mbstowcs=no
15900else
Matthias Kloseb9621712010-04-24 17:59:49 +000015901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015902/* end confdefs.h. */
15903
Stefan Krah19c21392012-11-22 23:47:32 +010015904#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015905#include<stdlib.h>
15906int main() {
15907 size_t len = -1;
15908 const char *str = "text";
15909 len = mbstowcs(NULL, str, 0);
15910 return (len != 4);
15911}
15912
15913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015914if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015915 ac_cv_broken_mbstowcs=no
15916else
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015921fi
15922
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015923fi
15924
Matthias Kloseb9621712010-04-24 17:59:49 +000015925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15926$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015927if test "$ac_cv_broken_mbstowcs" = yes
15928then
15929
Matthias Kloseb9621712010-04-24 17:59:49 +000015930$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015931
15932fi
15933
Antoine Pitroub52ec782009-01-25 16:34:23 +000015934# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15936$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015937
15938# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015939if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015940 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015941if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015942then
15943
Matthias Kloseb9621712010-04-24 17:59:49 +000015944$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15947$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015948fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015949if test "$withval" = no
15950then
15951
15952$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15953
Matthias Kloseb9621712010-04-24 17:59:49 +000015954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15955$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015956fi
15957
Antoine Pitrou042b1282010-08-13 21:15:58 +000015958else
15959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15960$as_echo "no value specified" >&6; }
15961fi
15962
Antoine Pitroub52ec782009-01-25 16:34:23 +000015963
Matthias Kloseb17289e2012-03-15 19:51:34 +010015964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15965$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15966if ${ac_cv_computed_gotos+:} false; then :
15967 $as_echo_n "(cached) " >&6
15968else
15969 if test "$cross_compiling" = yes; then :
15970 if test "${with_computed_gotos+set}" = set; then
15971 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15972 else
15973 ac_cv_computed_gotos=no
15974 fi
15975else
15976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15977/* end confdefs.h. */
15978
15979int main(int argc, char **argv)
15980{
15981 static void *targets[1] = { &&LABEL1 };
15982 goto LABEL2;
15983LABEL1:
15984 return 0;
15985LABEL2:
15986 goto *targets[0];
15987 return 1;
15988}
15989
15990_ACEOF
15991if ac_fn_c_try_run "$LINENO"; then :
15992 ac_cv_computed_gotos=yes
15993else
15994 ac_cv_computed_gotos=no
15995fi
15996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15997 conftest.$ac_objext conftest.beam conftest.$ac_ext
15998fi
15999
16000fi
16001
16002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16003$as_echo "$ac_cv_computed_gotos" >&6; }
16004case "$ac_cv_computed_gotos" in yes*)
16005
16006$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16007
16008esac
16009
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016010case $ac_sys_system in
16011AIX*)
16012
16013$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16014 ;;
16015esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016016
Michael W. Hudson54241132001-12-07 15:38:26 +000016017
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016018
16019
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016020for h in `(cd $srcdir;echo Python/thread_*.h)`
16021do
16022 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16023done
16024
Michael W. Hudson54241132001-12-07 15:38:26 +000016025
Ned Deily0db50cf2014-07-25 12:41:31 -070016026SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16028$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016029for dir in $SRCDIRS; do
16030 if test ! -d $dir; then
16031 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016032 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016033done
Matthias Kloseb9621712010-04-24 17:59:49 +000016034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16035$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016036
Stefan Krah1919b7e2012-03-21 18:25:23 +010016037# Availability of -O2:
16038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16039$as_echo_n "checking for -O2... " >&6; }
16040saved_cflags="$CFLAGS"
16041CFLAGS="-O2"
16042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16043/* end confdefs.h. */
16044
16045int
16046main ()
16047{
16048
16049
16050 ;
16051 return 0;
16052}
16053_ACEOF
16054if ac_fn_c_try_compile "$LINENO"; then :
16055 have_O2=yes
16056else
16057 have_O2=no
16058fi
16059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16061$as_echo "$have_O2" >&6; }
16062CFLAGS="$saved_cflags"
16063
16064# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16065# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16067$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16068saved_cflags="$CFLAGS"
16069CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16070if test "$have_O2" = no; then
16071 CFLAGS=""
16072fi
16073if test "$cross_compiling" = yes; then :
16074 have_glibc_memmove_bug=undefined
16075else
16076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16077/* end confdefs.h. */
16078
16079#include <stdio.h>
16080#include <stdlib.h>
16081#include <string.h>
16082void foo(void *p, void *q) { memmove(p, q, 19); }
16083int main() {
16084 char a[32] = "123456789000000000";
16085 foo(&a[9], a);
16086 if (strcmp(a, "123456789123456789000000000") != 0)
16087 return 1;
16088 foo(a, &a[9]);
16089 if (strcmp(a, "123456789000000000") != 0)
16090 return 1;
16091 return 0;
16092}
16093
16094_ACEOF
16095if ac_fn_c_try_run "$LINENO"; then :
16096 have_glibc_memmove_bug=no
16097else
16098 have_glibc_memmove_bug=yes
16099fi
16100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16101 conftest.$ac_objext conftest.beam conftest.$ac_ext
16102fi
16103
16104CFLAGS="$saved_cflags"
16105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16106$as_echo "$have_glibc_memmove_bug" >&6; }
16107if test "$have_glibc_memmove_bug" = yes; then
16108
16109$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16110
16111fi
16112
16113if test "$have_gcc_asm_for_x87" = yes; then
16114 # Some versions of gcc miscompile inline asm:
16115 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16116 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16117 case $CC in
16118 *gcc*)
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16120$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16121 saved_cflags="$CFLAGS"
16122 CFLAGS="-O2"
16123 if test "$cross_compiling" = yes; then :
16124 have_ipa_pure_const_bug=undefined
16125else
16126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16127/* end confdefs.h. */
16128
16129 __attribute__((noinline)) int
16130 foo(int *p) {
16131 int r;
16132 asm ( "movl \$6, (%1)\n\t"
16133 "xorl %0, %0\n\t"
16134 : "=r" (r) : "r" (p) : "memory"
16135 );
16136 return r;
16137 }
16138 int main() {
16139 int p = 8;
16140 if ((foo(&p) ? : p) != 6)
16141 return 1;
16142 return 0;
16143 }
16144
16145_ACEOF
16146if ac_fn_c_try_run "$LINENO"; then :
16147 have_ipa_pure_const_bug=no
16148else
16149 have_ipa_pure_const_bug=yes
16150fi
16151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16152 conftest.$ac_objext conftest.beam conftest.$ac_ext
16153fi
16154
16155 CFLAGS="$saved_cflags"
16156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16157$as_echo "$have_ipa_pure_const_bug" >&6; }
16158 if test "$have_ipa_pure_const_bug" = yes; then
16159
16160$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16161
16162 fi
16163 ;;
16164 esac
16165fi
16166
Victor Stinner4f5366e2015-01-09 02:13:19 +010016167# Check for stdatomic.h
16168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16169$as_echo_n "checking for stdatomic.h... " >&6; }
16170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16171/* end confdefs.h. */
16172
16173
16174 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016175 atomic_int value = ATOMIC_VAR_INIT(1);
16176 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016177 int main() {
16178 int loaded_value = atomic_load(&value);
16179 return 0;
16180 }
16181
16182
16183_ACEOF
16184if ac_fn_c_try_link "$LINENO"; then :
16185 have_stdatomic_h=yes
16186else
16187 have_stdatomic_h=no
16188fi
16189rm -f core conftest.err conftest.$ac_objext \
16190 conftest$ac_exeext conftest.$ac_ext
16191
16192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16193$as_echo "$have_stdatomic_h" >&6; }
16194
16195if test "$have_stdatomic_h" = yes; then
16196
16197$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16198
16199fi
16200
16201# Check for GCC >= 4.7 __atomic builtins
16202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16203$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16205/* end confdefs.h. */
16206
16207
16208 volatile int val = 1;
16209 int main() {
16210 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16211 return 0;
16212 }
16213
16214
16215_ACEOF
16216if ac_fn_c_try_link "$LINENO"; then :
16217 have_builtin_atomic=yes
16218else
16219 have_builtin_atomic=no
16220fi
16221rm -f core conftest.err conftest.$ac_objext \
16222 conftest$ac_exeext conftest.$ac_ext
16223
16224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16225$as_echo "$have_builtin_atomic" >&6; }
16226
16227if test "$have_builtin_atomic" = yes; then
16228
16229$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16230
16231fi
16232
Ned Deily322f5ba2013-11-21 23:01:59 -080016233# ensurepip option
16234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16235$as_echo_n "checking for ensurepip... " >&6; }
16236
16237# Check whether --with-ensurepip was given.
16238if test "${with_ensurepip+set}" = set; then :
16239 withval=$with_ensurepip;
16240else
16241 with_ensurepip=upgrade
16242fi
16243
16244case $with_ensurepip in #(
16245 yes|upgrade) :
16246 ENSUREPIP=upgrade ;; #(
16247 install) :
16248 ENSUREPIP=install ;; #(
16249 no) :
16250 ENSUREPIP=no ;; #(
16251 *) :
16252 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16253esac
16254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16255$as_echo "$ENSUREPIP" >&6; }
16256
16257
Victor Stinner35a97c02015-03-08 02:59:09 +010016258# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16260$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16262/* end confdefs.h. */
16263
16264
16265 #include <dirent.h>
16266
16267 int main() {
16268 struct dirent entry;
16269 return entry.d_type == DT_UNKNOWN;
16270 }
16271
16272
16273_ACEOF
16274if ac_fn_c_try_link "$LINENO"; then :
16275 have_dirent_d_type=yes
16276else
16277 have_dirent_d_type=no
16278fi
16279rm -f core conftest.err conftest.$ac_objext \
16280 conftest$ac_exeext conftest.$ac_ext
16281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16282$as_echo "$have_dirent_d_type" >&6; }
16283
16284if test "$have_dirent_d_type" = yes; then
16285
16286$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16287
16288fi
16289
Victor Stinner9eb57c52015-03-19 22:21:49 +010016290# check if the Linux getrandom() syscall is available
16291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16292$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16294/* end confdefs.h. */
16295
16296
Victor Stinner1b80b242016-04-12 22:34:58 +020016297 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016298 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016299 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016300
16301 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016302 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016303 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016304 const int flags = GRND_NONBLOCK;
16305 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016306 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016307 return 0;
16308 }
16309
16310
16311_ACEOF
16312if ac_fn_c_try_link "$LINENO"; then :
16313 have_getrandom_syscall=yes
16314else
16315 have_getrandom_syscall=no
16316fi
16317rm -f core conftest.err conftest.$ac_objext \
16318 conftest$ac_exeext conftest.$ac_ext
16319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16320$as_echo "$have_getrandom_syscall" >&6; }
16321
16322if test "$have_getrandom_syscall" = yes; then
16323
16324$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16325
16326fi
16327
Victor Stinnerbae2d622015-10-01 09:47:30 +020016328# check if the getrandom() function is available
16329# the test was written for the Solaris function of <sys/random.h>
16330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16331$as_echo_n "checking for the getrandom() function... " >&6; }
16332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16333/* end confdefs.h. */
16334
16335
16336 #include <sys/random.h>
16337
16338 int main() {
16339 char buffer[1];
16340 const size_t buflen = sizeof(buffer);
16341 const int flags = 0;
16342 /* ignore the result, Python checks for ENOSYS at runtime */
16343 (void)getrandom(buffer, buflen, flags);
16344 return 0;
16345 }
16346
16347
16348_ACEOF
16349if ac_fn_c_try_link "$LINENO"; then :
16350 have_getrandom=yes
16351else
16352 have_getrandom=no
16353fi
16354rm -f core conftest.err conftest.$ac_objext \
16355 conftest$ac_exeext conftest.$ac_ext
16356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16357$as_echo "$have_getrandom" >&6; }
16358
16359if test "$have_getrandom" = yes; then
16360
16361$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16362
16363fi
16364
Guido van Rossum627b2d71993-12-24 10:39:16 +000016365# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016366ac_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 +000016367
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016368ac_config_files="$ac_config_files Modules/ld_so_aix"
16369
Martin v. Löwis11437992002-04-12 09:54:03 +000016370cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016371# This file is a shell script that caches the results of configure
16372# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016373# scripts and configure runs, see configure's option --config-cache.
16374# It is not useful on other systems. If it contains results you don't
16375# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016376#
Martin v. Löwis11437992002-04-12 09:54:03 +000016377# config.status only pays attention to the cache file if you give it
16378# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016379#
Skip Montanaro6dead952003-09-25 14:50:04 +000016380# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016381# loading this file, other *unset* `ac_cv_foo' will be assigned the
16382# following values.
16383
16384_ACEOF
16385
Guido van Rossumf78abae1997-01-21 22:02:36 +000016386# The following way of writing the cache mishandles newlines in values,
16387# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016389# Ultrix sh set writes to stderr and can't be redirected directly,
16390# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016391(
16392 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16393 eval ac_val=\$$ac_var
16394 case $ac_val in #(
16395 *${as_nl}*)
16396 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016397 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16398$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399 esac
16400 case $ac_var in #(
16401 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016402 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16403 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404 esac ;;
16405 esac
16406 done
16407
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16410 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016411 # `set' does not quote correctly, so add quotes: double-quote
16412 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016414 "s/'/'\\\\''/g;
16415 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016417 *)
16418 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016420 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016421 esac |
16422 sort
16423) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016428 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16429 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16431 :end' >>confcache
16432if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16433 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016434 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016435 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16436$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016437 if test ! -f "$cache_file" || test -h "$cache_file"; then
16438 cat confcache >"$cache_file"
16439 else
16440 case $cache_file in #(
16441 */* | ?:*)
16442 mv -f confcache "$cache_file"$$ &&
16443 mv -f "$cache_file"$$ "$cache_file" ;; #(
16444 *)
16445 mv -f confcache "$cache_file" ;;
16446 esac
16447 fi
16448 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016449 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016450 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16451$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016452 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016453fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016454rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016455
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016456test "x$prefix" = xNONE && prefix=$ac_default_prefix
16457# Let make expand exec_prefix.
16458test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016459
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016460DEFS=-DHAVE_CONFIG_H
16461
Skip Montanaro6dead952003-09-25 14:50:04 +000016462ac_libobjs=
16463ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016464U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016465for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16466 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016467 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016468 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016469 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16470 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016471 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16472 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016473done
16474LIBOBJS=$ac_libobjs
16475
16476LTLIBOBJS=$ac_ltlibobjs
16477
16478
Martin v. Löwis11437992002-04-12 09:54:03 +000016479
Matthias Kloseb9621712010-04-24 17:59:49 +000016480
Victor Stinnere0be4232011-10-25 13:06:09 +020016481: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016482ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016483ac_clean_files_save=$ac_clean_files
16484ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016485{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16486$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16487as_write_fail=0
16488cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016489#! $SHELL
16490# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016491# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016492# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016493# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016494
Martin v. Löwis11437992002-04-12 09:54:03 +000016495debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016496ac_cs_recheck=false
16497ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016498
Matthias Kloseb9621712010-04-24 17:59:49 +000016499SHELL=\${CONFIG_SHELL-$SHELL}
16500export SHELL
16501_ASEOF
16502cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16503## -------------------- ##
16504## M4sh Initialization. ##
16505## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507# Be more Bourne compatible
16508DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016509if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016510 emulate sh
16511 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016512 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016513 # is contrary to our usage. Disable this feature.
16514 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016515 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016516else
Matthias Kloseb9621712010-04-24 17:59:49 +000016517 case `(set -o) 2>/dev/null` in #(
16518 *posix*) :
16519 set -o posix ;; #(
16520 *) :
16521 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016523fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016524
16525
Matthias Kloseb9621712010-04-24 17:59:49 +000016526as_nl='
16527'
16528export as_nl
16529# Printing a long string crashes Solaris 7 /usr/bin/printf.
16530as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16531as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16532as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16533# Prefer a ksh shell builtin over an external printf program on Solaris,
16534# but without wasting forks for bash or zsh.
16535if test -z "$BASH_VERSION$ZSH_VERSION" \
16536 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16537 as_echo='print -r --'
16538 as_echo_n='print -rn --'
16539elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16540 as_echo='printf %s\n'
16541 as_echo_n='printf %s'
16542else
16543 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16544 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16545 as_echo_n='/usr/ucb/echo -n'
16546 else
16547 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16548 as_echo_n_body='eval
16549 arg=$1;
16550 case $arg in #(
16551 *"$as_nl"*)
16552 expr "X$arg" : "X\\(.*\\)$as_nl";
16553 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16554 esac;
16555 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16556 '
16557 export as_echo_n_body
16558 as_echo_n='sh -c $as_echo_n_body as_echo'
16559 fi
16560 export as_echo_body
16561 as_echo='sh -c $as_echo_body as_echo'
16562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016563
16564# The user is always right.
16565if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016566 PATH_SEPARATOR=:
16567 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16568 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16569 PATH_SEPARATOR=';'
16570 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573
16574# IFS
16575# We need space, tab and new line, in precisely that order. Quoting is
16576# there to prevent editors from complaining about space-tab.
16577# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16578# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016579IFS=" "" $as_nl"
16580
16581# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016582as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016583case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584 *[\\/]* ) as_myself=$0 ;;
16585 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016586for as_dir in $PATH
16587do
16588 IFS=$as_save_IFS
16589 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016590 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16591 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594 ;;
16595esac
16596# We did not find ourselves, most probably we were run as `sh COMMAND'
16597# in which case we are not to be found in the path.
16598if test "x$as_myself" = x; then
16599 as_myself=$0
16600fi
16601if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016602 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16603 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604fi
16605
Matthias Kloseb9621712010-04-24 17:59:49 +000016606# Unset variables that we do not need and which cause bugs (e.g. in
16607# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16608# suppresses any "Segmentation fault" message there. '((' could
16609# trigger a bug in pdksh 5.2.14.
16610for as_var in BASH_ENV ENV MAIL MAILPATH
16611do eval test x\${$as_var+set} = xset \
16612 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613done
16614PS1='$ '
16615PS2='> '
16616PS4='+ '
16617
16618# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016619LC_ALL=C
16620export LC_ALL
16621LANGUAGE=C
16622export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623
Matthias Kloseb9621712010-04-24 17:59:49 +000016624# CDPATH.
16625(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16626
16627
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016628# as_fn_error STATUS ERROR [LINENO LOG_FD]
16629# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016630# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16631# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016632# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016633as_fn_error ()
16634{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016635 as_status=$1; test $as_status -eq 0 && as_status=1
16636 if test "$4"; then
16637 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16638 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016639 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016640 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016641 as_fn_exit $as_status
16642} # as_fn_error
16643
16644
16645# as_fn_set_status STATUS
16646# -----------------------
16647# Set $? to STATUS, without forking.
16648as_fn_set_status ()
16649{
16650 return $1
16651} # as_fn_set_status
16652
16653# as_fn_exit STATUS
16654# -----------------
16655# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16656as_fn_exit ()
16657{
16658 set +e
16659 as_fn_set_status $1
16660 exit $1
16661} # as_fn_exit
16662
16663# as_fn_unset VAR
16664# ---------------
16665# Portably unset VAR.
16666as_fn_unset ()
16667{
16668 { eval $1=; unset $1;}
16669}
16670as_unset=as_fn_unset
16671# as_fn_append VAR VALUE
16672# ----------------------
16673# Append the text in VALUE to the end of the definition contained in VAR. Take
16674# advantage of any shell optimizations that allow amortized linear growth over
16675# repeated appends, instead of the typical quadratic growth present in naive
16676# implementations.
16677if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16678 eval 'as_fn_append ()
16679 {
16680 eval $1+=\$2
16681 }'
16682else
16683 as_fn_append ()
16684 {
16685 eval $1=\$$1\$2
16686 }
16687fi # as_fn_append
16688
16689# as_fn_arith ARG...
16690# ------------------
16691# Perform arithmetic evaluation on the ARGs, and store the result in the
16692# global $as_val. Take advantage of shells that can avoid forks. The arguments
16693# must be portable across $(()) and expr.
16694if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16695 eval 'as_fn_arith ()
16696 {
16697 as_val=$(( $* ))
16698 }'
16699else
16700 as_fn_arith ()
16701 {
16702 as_val=`expr "$@" || test $? -eq 1`
16703 }
16704fi # as_fn_arith
16705
16706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707if expr a : '\(a\)' >/dev/null 2>&1 &&
16708 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16709 as_expr=expr
16710else
16711 as_expr=false
16712fi
16713
16714if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16715 as_basename=basename
16716else
16717 as_basename=false
16718fi
16719
Matthias Kloseb9621712010-04-24 17:59:49 +000016720if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16721 as_dirname=dirname
16722else
16723 as_dirname=false
16724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726as_me=`$as_basename -- "$0" ||
16727$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16728 X"$0" : 'X\(//\)$' \| \
16729 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016730$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731 sed '/^.*\/\([^/][^/]*\)\/*$/{
16732 s//\1/
16733 q
16734 }
16735 /^X\/\(\/\/\)$/{
16736 s//\1/
16737 q
16738 }
16739 /^X\/\(\/\).*/{
16740 s//\1/
16741 q
16742 }
16743 s/.*/./; q'`
16744
Matthias Kloseb9621712010-04-24 17:59:49 +000016745# Avoid depending upon Character Ranges.
16746as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16747as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16748as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16749as_cr_digits='0123456789'
16750as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016751
16752ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016753case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016754-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016755 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016757 xy) ECHO_C='\c';;
16758 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16759 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760 esac;;
16761*)
16762 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016763esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016764
Martin v. Löwis11437992002-04-12 09:54:03 +000016765rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016766if test -d conf$$.dir; then
16767 rm -f conf$$.dir/conf$$.file
16768else
16769 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016770 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016772if (echo >conf$$.file) 2>/dev/null; then
16773 if ln -s conf$$.file conf$$ 2>/dev/null; then
16774 as_ln_s='ln -s'
16775 # ... but there are two gotchas:
16776 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16777 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016778 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016779 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016780 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016781 elif ln conf$$.file conf$$ 2>/dev/null; then
16782 as_ln_s=ln
16783 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016784 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016785 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016786else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016787 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16790rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016791
Matthias Kloseb9621712010-04-24 17:59:49 +000016792
16793# as_fn_mkdir_p
16794# -------------
16795# Create "$as_dir" as a directory, including parents if necessary.
16796as_fn_mkdir_p ()
16797{
16798
16799 case $as_dir in #(
16800 -*) as_dir=./$as_dir;;
16801 esac
16802 test -d "$as_dir" || eval $as_mkdir_p || {
16803 as_dirs=
16804 while :; do
16805 case $as_dir in #(
16806 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16807 *) as_qdir=$as_dir;;
16808 esac
16809 as_dirs="'$as_qdir' $as_dirs"
16810 as_dir=`$as_dirname -- "$as_dir" ||
16811$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16812 X"$as_dir" : 'X\(//\)[^/]' \| \
16813 X"$as_dir" : 'X\(//\)$' \| \
16814 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16815$as_echo X"$as_dir" |
16816 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16817 s//\1/
16818 q
16819 }
16820 /^X\(\/\/\)[^/].*/{
16821 s//\1/
16822 q
16823 }
16824 /^X\(\/\/\)$/{
16825 s//\1/
16826 q
16827 }
16828 /^X\(\/\).*/{
16829 s//\1/
16830 q
16831 }
16832 s/.*/./; q'`
16833 test -d "$as_dir" && break
16834 done
16835 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016836 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016837
16838
16839} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016840if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016841 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016842else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016843 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016844 as_mkdir_p=false
16845fi
16846
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016847
16848# as_fn_executable_p FILE
16849# -----------------------
16850# Test if FILE is an executable regular file.
16851as_fn_executable_p ()
16852{
16853 test -f "$1" && test -x "$1"
16854} # as_fn_executable_p
16855as_test_x='test -x'
16856as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016857
16858# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016859as_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 +000016860
16861# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016862as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016863
16864
Martin v. Löwis11437992002-04-12 09:54:03 +000016865exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016866## ----------------------------------- ##
16867## Main body of $CONFIG_STATUS script. ##
16868## ----------------------------------- ##
16869_ASEOF
16870test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016871
Matthias Kloseb9621712010-04-24 17:59:49 +000016872cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16873# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016874# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875# values after options handling.
16876ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016877This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016878generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016879
16880 CONFIG_FILES = $CONFIG_FILES
16881 CONFIG_HEADERS = $CONFIG_HEADERS
16882 CONFIG_LINKS = $CONFIG_LINKS
16883 CONFIG_COMMANDS = $CONFIG_COMMANDS
16884 $ $0 $@
16885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016886on `(hostname || uname -n) 2>/dev/null | sed 1q`
16887"
16888
Martin v. Löwis11437992002-04-12 09:54:03 +000016889_ACEOF
16890
Matthias Kloseb9621712010-04-24 17:59:49 +000016891case $ac_config_files in *"
16892"*) set x $ac_config_files; shift; ac_config_files=$*;;
16893esac
16894
16895case $ac_config_headers in *"
16896"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16897esac
16898
16899
16900cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016901# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016902config_files="$ac_config_files"
16903config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016906
Matthias Kloseb9621712010-04-24 17:59:49 +000016907cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016908ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016909\`$as_me' instantiates files and other configuration actions
16910from templates according to the current configuration. Unless the files
16911and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016912
Matthias Kloseb9621712010-04-24 17:59:49 +000016913Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016914
16915 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016917 --config print configuration, then exit
16918 -q, --quiet, --silent
16919 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 -d, --debug don't remove temporary files
16921 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016922 --file=FILE[:TEMPLATE]
16923 instantiate the configuration file FILE
16924 --header=FILE[:TEMPLATE]
16925 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016926
16927Configuration files:
16928$config_files
16929
16930Configuration headers:
16931$config_headers
16932
Matthias Kloseb9621712010-04-24 17:59:49 +000016933Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16937ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016938ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016939python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016940configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016941 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016942
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016943Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016944This config.status script is free software; the Free Software Foundation
16945gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016946
16947ac_pwd='$ac_pwd'
16948srcdir='$srcdir'
16949INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016950MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016951test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016952_ACEOF
16953
Matthias Kloseb9621712010-04-24 17:59:49 +000016954cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16955# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016956ac_need_defaults=:
16957while test $# != 0
16958do
16959 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016960 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16962 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016963 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016964 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016965 --*=)
16966 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16967 ac_optarg=
16968 ac_shift=:
16969 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016970 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016971 ac_option=$1
16972 ac_optarg=$2
16973 ac_shift=shift
16974 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 esac
16976
Skip Montanaro6dead952003-09-25 14:50:04 +000016977 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016978 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016979 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16980 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016982 $as_echo "$ac_cs_version"; exit ;;
16983 --config | --confi | --conf | --con | --co | --c )
16984 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016985 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 debug=: ;;
16987 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016988 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016989 case $ac_optarg in
16990 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016991 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016992 esac
16993 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 ac_need_defaults=false;;
16995 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016996 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016997 case $ac_optarg in
16998 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16999 esac
17000 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017001 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002 --he | --h)
17003 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017004 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017005Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017007 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017008 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17009 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17010 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017011
17012 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017013 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017014Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017018
17019 esac
17020 shift
17021done
17022
Skip Montanaro6dead952003-09-25 14:50:04 +000017023ac_configure_extra_args=
17024
17025if $ac_cs_silent; then
17026 exec 6>/dev/null
17027 ac_configure_extra_args="$ac_configure_extra_args --silent"
17028fi
17029
17030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017031cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017032if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017033 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017034 shift
17035 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17036 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017038 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017039fi
17040
Martin v. Löwis11437992002-04-12 09:54:03 +000017041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043exec 5>>config.log
17044{
17045 echo
17046 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17047## Running $as_me. ##
17048_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017049 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017053cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017054_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017055
Matthias Kloseb9621712010-04-24 17:59:49 +000017056cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057
17058# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017059for ac_config_target in $ac_config_targets
17060do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017061 case $ac_config_target in
17062 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17063 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17064 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017065 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17066 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17068 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017069 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017070 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017071 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072
Victor Stinnere0be4232011-10-25 13:06:09 +020017073 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 esac
17075done
17076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077
Martin v. Löwis11437992002-04-12 09:54:03 +000017078# If the user did not use the arguments to specify the items to instantiate,
17079# then the envvar interface is used. Set only those that are not.
17080# We use the long form for the default assignment because of an extremely
17081# bizarre bug on SunOS 4.1.3.
17082if $ac_need_defaults; then
17083 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17084 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17085fi
17086
Skip Montanaro6dead952003-09-25 14:50:04 +000017087# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017089# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090# Hook for its removal unless debugging.
17091# Note that there is a small window in which the directory will not be cleaned:
17092# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017093$debug ||
17094{
Victor Stinnere0be4232011-10-25 13:06:09 +020017095 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017096 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017097 : "${ac_tmp:=$tmp}"
17098 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017100 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017101}
Martin v. Löwis11437992002-04-12 09:54:03 +000017102# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017103
Martin v. Löwis11437992002-04-12 09:54:03 +000017104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017105 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017106 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017107} ||
17108{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109 tmp=./conf$$-$RANDOM
17110 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017111} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017112ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017113
Matthias Kloseb9621712010-04-24 17:59:49 +000017114# Set up the scripts for CONFIG_FILES section.
17115# No need to generate them if there are no CONFIG_FILES.
17116# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017117if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017118
Matthias Kloseb9621712010-04-24 17:59:49 +000017119
17120ac_cr=`echo X | tr X '\015'`
17121# On cygwin, bash can eat \r inside `` if the user requested igncr.
17122# But we know of no other shell where ac_cr would be empty at this
17123# point, so we can use a bashism as a fallback.
17124if test "x$ac_cr" = x; then
17125 eval ac_cr=\$\'\\r\'
17126fi
17127ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17128if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017129 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017130else
17131 ac_cs_awk_cr=$ac_cr
17132fi
17133
Victor Stinnere0be4232011-10-25 13:06:09 +020017134echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017135_ACEOF
17136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017137
Matthias Kloseb9621712010-04-24 17:59:49 +000017138{
17139 echo "cat >conf$$subs.awk <<_ACEOF" &&
17140 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17141 echo "_ACEOF"
17142} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017143 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17144ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145ac_delim='%!_!# '
17146for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017147 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017148 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017149
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17151 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017152 break
17153 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017154 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017155 else
17156 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017157 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017158done
Matthias Kloseb9621712010-04-24 17:59:49 +000017159rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160
Matthias Kloseb9621712010-04-24 17:59:49 +000017161cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017162cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017164sed -n '
17165h
17166s/^/S["/; s/!.*/"]=/
17167p
17168g
17169s/^[^!]*!//
17170:repl
17171t repl
17172s/'"$ac_delim"'$//
17173t delim
17174:nl
17175h
17176s/\(.\{148\}\)..*/\1/
17177t more1
17178s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17179p
17180n
17181b repl
17182:more1
17183s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17184p
17185g
17186s/.\{148\}//
17187t nl
17188:delim
17189h
17190s/\(.\{148\}\)..*/\1/
17191t more2
17192s/["\\]/\\&/g; s/^/"/; s/$/"/
17193p
17194b
17195:more2
17196s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17197p
17198g
17199s/.\{148\}//
17200t delim
17201' <conf$$subs.awk | sed '
17202/^[^""]/{
17203 N
17204 s/\n//
17205}
17206' >>$CONFIG_STATUS || ac_write_fail=1
17207rm -f conf$$subs.awk
17208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17209_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017210cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017211 for (key in S) S_is_set[key] = 1
17212 FS = ""
17213
17214}
17215{
17216 line = $ 0
17217 nfields = split(line, field, "@")
17218 substed = 0
17219 len = length(field[1])
17220 for (i = 2; i < nfields; i++) {
17221 key = field[i]
17222 keylen = length(key)
17223 if (S_is_set[key]) {
17224 value = S[key]
17225 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17226 len += length(value) + length(field[++i])
17227 substed = 1
17228 } else
17229 len += 1 + keylen
17230 }
17231
17232 print line
17233}
17234
17235_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017237cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17238if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17239 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17240else
17241 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017242fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017243 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017244_ACEOF
17245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017246# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17247# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248# trailing colons and then remove the whole line if VPATH becomes empty
17249# (actually we leave an empty line to preserve line numbers).
17250if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017251 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17252h
17253s///
17254s/^/:/
17255s/[ ]*$/:/
17256s/:\$(srcdir):/:/g
17257s/:\${srcdir}:/:/g
17258s/:@srcdir@:/:/g
17259s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017261x
17262s/\(=[ ]*\).*/\1/
17263G
17264s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265s/^[^=]*=[ ]*$//
17266}'
17267fi
17268
Matthias Kloseb9621712010-04-24 17:59:49 +000017269cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017270fi # test -n "$CONFIG_FILES"
17271
Matthias Kloseb9621712010-04-24 17:59:49 +000017272# Set up the scripts for CONFIG_HEADERS section.
17273# No need to generate them if there are no CONFIG_HEADERS.
17274# This happens for instance with `./config.status Makefile'.
17275if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017276cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017277BEGIN {
17278_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279
Matthias Kloseb9621712010-04-24 17:59:49 +000017280# Transform confdefs.h into an awk script `defines.awk', embedded as
17281# here-document in config.status, that substitutes the proper values into
17282# config.h.in to produce config.h.
17283
17284# Create a delimiter string that does not exist in confdefs.h, to ease
17285# handling of long lines.
17286ac_delim='%!_!# '
17287for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017288 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17289 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017290 break
17291 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017292 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017293 else
17294 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17295 fi
17296done
17297
17298# For the awk script, D is an array of macro values keyed by name,
17299# likewise P contains macro parameters if any. Preserve backslash
17300# newline sequences.
17301
17302ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17303sed -n '
17304s/.\{148\}/&'"$ac_delim"'/g
17305t rset
17306:rset
17307s/^[ ]*#[ ]*define[ ][ ]*/ /
17308t def
17309d
17310:def
17311s/\\$//
17312t bsnl
17313s/["\\]/\\&/g
17314s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17315D["\1"]=" \3"/p
17316s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17317d
17318:bsnl
17319s/["\\]/\\&/g
17320s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17321D["\1"]=" \3\\\\\\n"\\/p
17322t cont
17323s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17324t cont
17325d
17326:cont
17327n
17328s/.\{148\}/&'"$ac_delim"'/g
17329t clear
17330:clear
17331s/\\$//
17332t bsnlc
17333s/["\\]/\\&/g; s/^/"/; s/$/"/p
17334d
17335:bsnlc
17336s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17337b cont
17338' <confdefs.h | sed '
17339s/'"$ac_delim"'/"\\\
17340"/g' >>$CONFIG_STATUS || ac_write_fail=1
17341
17342cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17343 for (key in D) D_is_set[key] = 1
17344 FS = ""
17345}
17346/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17347 line = \$ 0
17348 split(line, arg, " ")
17349 if (arg[1] == "#") {
17350 defundef = arg[2]
17351 mac1 = arg[3]
17352 } else {
17353 defundef = substr(arg[1], 2)
17354 mac1 = arg[2]
17355 }
17356 split(mac1, mac2, "(") #)
17357 macro = mac2[1]
17358 prefix = substr(line, 1, index(line, defundef) - 1)
17359 if (D_is_set[macro]) {
17360 # Preserve the white space surrounding the "#".
17361 print prefix "define", macro P[macro] D[macro]
17362 next
17363 } else {
17364 # Replace #undef with comments. This is necessary, for example,
17365 # in the case of _POSIX_SOURCE, which is predefined and required
17366 # on some systems where configure will not decide to define it.
17367 if (defundef == "undef") {
17368 print "/*", prefix defundef, macro, "*/"
17369 next
17370 }
17371 }
17372}
17373{ print }
17374_ACAWK
17375_ACEOF
17376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017377 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017378fi # test -n "$CONFIG_HEADERS"
17379
17380
17381eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17382shift
17383for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384do
17385 case $ac_tag in
17386 :[FHLC]) ac_mode=$ac_tag; continue;;
17387 esac
17388 case $ac_mode$ac_tag in
17389 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017390 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 :[FH]-) ac_tag=-:-;;
17392 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17393 esac
17394 ac_save_IFS=$IFS
17395 IFS=:
17396 set x $ac_tag
17397 IFS=$ac_save_IFS
17398 shift
17399 ac_file=$1
17400 shift
17401
17402 case $ac_mode in
17403 :L) ac_source=$1;;
17404 :[FH])
17405 ac_file_inputs=
17406 for ac_f
17407 do
17408 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017409 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410 *) # Look for the file first in the build tree, then in the source tree
17411 # (if the path is not absolute). The absolute path cannot be DOS-style,
17412 # because $ac_f cannot contain `:'.
17413 test -f "$ac_f" ||
17414 case $ac_f in
17415 [\\/$]*) false;;
17416 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17417 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017418 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017420 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17421 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422 done
17423
17424 # Let's still pretend it is `configure' which instantiates (i.e., don't
17425 # use $as_me), people would be surprised to read:
17426 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017427 configure_input='Generated from '`
17428 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17429 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 if test x"$ac_file" != x-; then
17431 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017432 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17433$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017435 # Neutralize special characters interpreted by sed in replacement strings.
17436 case $configure_input in #(
17437 *\&* | *\|* | *\\* )
17438 ac_sed_conf_input=`$as_echo "$configure_input" |
17439 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17440 *) ac_sed_conf_input=$configure_input;;
17441 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442
17443 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017444 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17445 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446 esac
17447 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 esac
17449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017450 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017451$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017452 X"$ac_file" : 'X\(//\)[^/]' \| \
17453 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017455$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017456 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17457 s//\1/
17458 q
17459 }
17460 /^X\(\/\/\)[^/].*/{
17461 s//\1/
17462 q
17463 }
17464 /^X\(\/\/\)$/{
17465 s//\1/
17466 q
17467 }
17468 /^X\(\/\).*/{
17469 s//\1/
17470 q
17471 }
17472 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017473 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017474 ac_builddir=.
17475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476case "$ac_dir" in
17477.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17478*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017479 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017481 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482 case $ac_top_builddir_sub in
17483 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17484 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17485 esac ;;
17486esac
17487ac_abs_top_builddir=$ac_pwd
17488ac_abs_builddir=$ac_pwd$ac_dir_suffix
17489# for backward compatibility:
17490ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017491
17492case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017493 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017494 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495 ac_top_srcdir=$ac_top_builddir_sub
17496 ac_abs_top_srcdir=$ac_pwd ;;
17497 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017498 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017499 ac_top_srcdir=$srcdir
17500 ac_abs_top_srcdir=$srcdir ;;
17501 *) # Relative name.
17502 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17503 ac_top_srcdir=$ac_top_build_prefix$srcdir
17504 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017505esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017507
Martin v. Löwis11437992002-04-12 09:54:03 +000017508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509 case $ac_mode in
17510 :F)
17511 #
17512 # CONFIG_FILE
17513 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017514
17515 case $INSTALL in
17516 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017519 ac_MKDIR_P=$MKDIR_P
17520 case $MKDIR_P in
17521 [\\/$]* | ?:[\\/]* ) ;;
17522 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17523 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017524_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525
Matthias Kloseb9621712010-04-24 17:59:49 +000017526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527# If the template does not know about datarootdir, expand it.
17528# FIXME: This hack should be removed a few years after 2.60.
17529ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017530ac_sed_dataroot='
17531/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532 p
17533 q
17534}
17535/@datadir@/p
17536/@docdir@/p
17537/@infodir@/p
17538/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017539/@mandir@/p'
17540case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017541*datarootdir*) ac_datarootdir_seen=yes;;
17542*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17544$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017546cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547 ac_datarootdir_hack='
17548 s&@datadir@&$datadir&g
17549 s&@docdir@&$docdir&g
17550 s&@infodir@&$infodir&g
17551 s&@localedir@&$localedir&g
17552 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017553 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554esac
17555_ACEOF
17556
17557# Neutralize VPATH when `$srcdir' = `.'.
17558# Shell code in configure.ac might set extrasub.
17559# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17561ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017562$extrasub
17563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017565:t
17566/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017567s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017569s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570s&@srcdir@&$ac_srcdir&;t t
17571s&@abs_srcdir@&$ac_abs_srcdir&;t t
17572s&@top_srcdir@&$ac_top_srcdir&;t t
17573s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17574s&@builddir@&$ac_builddir&;t t
17575s&@abs_builddir@&$ac_abs_builddir&;t t
17576s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17577s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017578s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017580"
Victor Stinnere0be4232011-10-25 13:06:09 +020017581eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17582 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017585 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17586 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17587 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017588 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017589which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017590$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017591which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017592
Victor Stinnere0be4232011-10-25 13:06:09 +020017593 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017594 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017595 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17596 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017597 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017598 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599 ;;
17600 :H)
17601 #
17602 # CONFIG_HEADER
17603 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017604 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017605 {
17606 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017607 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17608 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017609 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017610 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017611 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17612$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017613 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017614 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017615 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017616 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 fi
17618 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017619 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017620 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017621 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625
17626 esac
17627
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017628
17629 case $ac_file$ac_mode in
17630 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17631
17632 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633done # for ac_tag
17634
Guido van Rossum627b2d71993-12-24 10:39:16 +000017635
Matthias Kloseb9621712010-04-24 17:59:49 +000017636as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017637_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017638ac_clean_files=$ac_clean_files_save
17639
Matthias Kloseb9621712010-04-24 17:59:49 +000017640test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017641 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017642
Martin v. Löwis11437992002-04-12 09:54:03 +000017643
17644# configure is writing to config.log, and then calls config.status.
17645# config.status does its own redirection, appending to config.log.
17646# Unfortunately, on DOS this fails, as config.log is still kept open
17647# by configure, so config.status won't be able to write to it; its
17648# output is simply discarded. So we exec the FD to /dev/null,
17649# effectively closing config.log, so it can be properly (re)opened and
17650# appended to by config.status. When coming back to configure, we
17651# need to make the FD available again.
17652if test "$no_create" != yes; then
17653 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017654 ac_config_status_args=
17655 test "$silent" = yes &&
17656 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017657 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017658 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 exec 5>>config.log
17660 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17661 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017662 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017663fi
17664if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17666$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017667fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017668
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017669
Christian Heimes75ed8902013-11-20 01:11:18 +010017670echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017671if test ! -f Modules/Setup
17672then
17673 cp $srcdir/Modules/Setup.dist Modules/Setup
17674fi
17675
Christian Heimes75ed8902013-11-20 01:11:18 +010017676echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017677if test ! -f Modules/Setup.local
17678then
17679 echo "# Edit this file for local setup changes" >Modules/Setup.local
17680fi
17681
Christian Heimes75ed8902013-11-20 01:11:18 +010017682echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017683$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17684 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017685 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017686mv config.c Modules