blob: 5858af654ac0ab7a1d4010fea504f4c8f3522f7b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200683ac_ct_READELF
684READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000685ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200686ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000687AR
688RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000689USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000690GNULD
691LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000696PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BLDLIBRARY
698DLLLIBRARY
699LDLIBRARY
700LIBRARY
701BUILDEXEEXT
702EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200703NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200704MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200705PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200706PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200708ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MAINCC
710CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711GREP
712CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200723_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000724MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000725FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000726FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800727FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000743GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200744PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200745PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
Benjamin Petersoned4aa832016-09-05 17:44:18 -0700778runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000779localstatedir
780sharedstatedir
781sysconfdir
782datadir
783datarootdir
784libexecdir
785sbindir
786bindir
787program_transform_name
788prefix
789exec_prefix
790PACKAGE_URL
791PACKAGE_BUGREPORT
792PACKAGE_STRING
793PACKAGE_VERSION
794PACKAGE_TARNAME
795PACKAGE_NAME
796PATH_SEPARATOR
797SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000798ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000799ac_user_opts='
800enable_option_checking
801enable_universalsdk
802with_universal_archs
803with_framework_name
804enable_framework
805with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600806with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_cxx_main
808with_suffix
809enable_shared
810enable_profiling
811with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700812with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100813with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100814with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_libs
816with_system_expat
817with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100818with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000819enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700820with_tcltk_includes
821with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_dbmliborder
823with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_threads
825with_thread
826enable_ipv6
827with_doc_strings
828with_tsc
829with_pymalloc
830with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_fpectl
832with_libm
833with_libc
834enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800836with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000837'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 ac_precious_vars='build_alias
839host_alias
840target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100841MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842CC
843CFLAGS
844LDFLAGS
845LIBS
846CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100847CPP
848PKG_CONFIG
849PKG_CONFIG_PATH
850PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854ac_init_help=
855ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000856ac_unrecognized_opts=
857ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# The variables have the same names as the options, with
859# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872x_includes=NONE
873x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
Benjamin Petersoned4aa832016-09-05 17:44:18 -0700889runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890includedir='${prefix}/include'
891oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893infodir='${datarootdir}/info'
894htmldir='${docdir}'
895dvidir='${docdir}'
896pdfdir='${docdir}'
897psdir='${docdir}'
898libdir='${exec_prefix}/lib'
899localedir='${datarootdir}/locale'
900mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 # If the previous option needs an argument, assign it.
907 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 ac_prev=
910 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200914 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915 *=) ac_optarg= ;;
916 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Accept the important Cygnus configure options, so we can diagnose typos.
920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_dashdash$ac_option in
922 --)
923 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -bindir | --bindir | --bindi | --bind | --bin | --bi)
926 ac_prev=bindir ;;
927 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
930 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 -cache-file | --cache-file | --cache-fil | --cache-fi \
936 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937 ac_prev=cache_file ;;
938 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 cache_file=$ac_optarg ;;
941
942 --config-cache | -C)
943 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951 | --dataroo | --dataro | --datar)
952 ac_prev=datarootdir ;;
953 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955 datarootdir=$ac_optarg ;;
956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200961 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt_orig=$ac_useropt
963 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972
973 -docdir | --docdir | --docdi | --doc | --do)
974 ac_prev=docdir ;;
975 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976 docdir=$ac_optarg ;;
977
978 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979 ac_prev=dvidir ;;
980 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001 | --exec | --exe | --ex)
1002 ac_prev=exec_prefix ;;
1003 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 # Obsolete; use --with-gas.
1010 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 -help | --help | --hel | --he | -h)
1013 ac_init_help=long ;;
1014 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015 ac_init_help=recursive ;;
1016 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025 ac_prev=htmldir ;;
1026 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027 | --ht=*)
1028 htmldir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -includedir | --includedir | --includedi | --included | --include \
1031 | --includ | --inclu | --incl | --inc)
1032 ac_prev=includedir ;;
1033 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -infodir | --infodir | --infodi | --infod | --info | --inf)
1038 ac_prev=infodir ;;
1039 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libdir | --libdir | --libdi | --libd)
1043 ac_prev=libdir ;;
1044 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048 | --libexe | --libex | --libe)
1049 ac_prev=libexecdir ;;
1050 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -localedir | --localedir | --localedi | --localed | --locale)
1055 ac_prev=localedir ;;
1056 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057 localedir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 ac_prev=localstatedir ;;
1062 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067 ac_prev=mandir ;;
1068 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 # Obsolete; use --without-fp.
1073 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 no_create=yes ;;
1078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085 | --oldin | --oldi | --old | --ol | --o)
1086 ac_prev=oldincludedir ;;
1087 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093 ac_prev=prefix ;;
1094 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098 | --program-pre | --program-pr | --program-p)
1099 ac_prev=program_prefix ;;
1100 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105 | --program-suf | --program-su | --program-s)
1106 ac_prev=program_suffix ;;
1107 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-transform-name | --program-transform-name \
1112 | --program-transform-nam | --program-transform-na \
1113 | --program-transform-n | --program-transform- \
1114 | --program-transform | --program-transfor \
1115 | --program-transfo | --program-transf \
1116 | --program-trans | --program-tran \
1117 | --progr-tra | --program-tr | --program-t)
1118 ac_prev=program_transform_name ;;
1119 -program-transform-name=* | --program-transform-name=* \
1120 | --program-transform-nam=* | --program-transform-na=* \
1121 | --program-transform-n=* | --program-transform-=* \
1122 | --program-transform=* | --program-transfor=* \
1123 | --program-transfo=* | --program-transf=* \
1124 | --program-trans=* | --program-tran=* \
1125 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001128 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129 ac_prev=pdfdir ;;
1130 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131 pdfdir=$ac_optarg ;;
1132
1133 -psdir | --psdir | --psdi | --psd | --ps)
1134 ac_prev=psdir ;;
1135 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136 psdir=$ac_optarg ;;
1137
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 silent=yes ;;
1141
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001142 -runstatedir | --runstatedir | --runstatedi | --runstated \
1143 | --runstate | --runstat | --runsta | --runst | --runs \
1144 | --run | --ru | --r)
1145 ac_prev=runstatedir ;;
1146 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1147 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1148 | --run=* | --ru=* | --r=*)
1149 runstatedir=$ac_optarg ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001288 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001401\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersoned4aa832016-09-05 17:44:18 -07001441 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001467 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001530 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001624python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
Matthias Kloseb9621712010-04-24 17:59:49 +00001977# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1978# --------------------------------------------
1979# Tries to find the compile-time value of EXPR in a program that includes
1980# INCLUDES, setting VAR accordingly. Returns whether the value could be
1981# computed
1982ac_fn_c_compute_int ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 if test "$cross_compiling" = yes; then
1986 # Depending upon the size, compute the lo and hi bounds.
1987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 ac_lo=0 ac_mid=0
2003 while :; do
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_hi=$ac_mid; break
2020else
2021 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2022 if test $ac_lo -le $ac_mid; then
2023 ac_lo= ac_hi=
2024 break
2025 fi
2026 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 done
2030else
2031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032/* end confdefs.h. */
2033$4
2034int
2035main ()
2036{
2037static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002038test_array [0] = 0;
2039return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=-1 ac_mid=-1
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_lo=$ac_mid; break
2064else
2065 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2066 if test $ac_mid -le $ac_hi; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 ac_lo= ac_hi=
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080# Binary search between lo and hi bounds.
2081while test "x$ac_lo" != "x$ac_hi"; do
2082 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid
2099else
2100 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103done
2104case $ac_lo in #((
2105?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2106'') ac_retval=1 ;;
2107esac
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112static long int longval () { return $2; }
2113static unsigned long int ulongval () { return $2; }
2114#include <stdio.h>
2115#include <stdlib.h>
2116int
2117main ()
2118{
2119
2120 FILE *f = fopen ("conftest.val", "w");
2121 if (! f)
2122 return 1;
2123 if (($2) < 0)
2124 {
2125 long int i = longval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%ld", i);
2129 }
2130 else
2131 {
2132 unsigned long int i = ulongval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%lu", i);
2136 }
2137 /* Do not output a trailing newline, as this causes \r\n confusion
2138 on some platforms. */
2139 return ferror (f) || fclose (f) != 0;
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_run "$LINENO"; then :
2146 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2147else
2148 ac_retval=1
2149fi
2150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2151 conftest.$ac_objext conftest.beam conftest.$ac_ext
2152rm -f conftest.val
2153
2154 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_compute_int
2159
2160# ac_fn_c_check_func LINENO FUNC VAR
2161# ----------------------------------
2162# Tests whether FUNC exists, setting the cache variable VAR accordingly
2163ac_fn_c_check_func ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2167$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002168if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002169 $as_echo_n "(cached) " >&6
2170else
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2174 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2175#define $2 innocuous_$2
2176
2177/* System header to define __stub macros and hopefully few prototypes,
2178 which can conflict with char $2 (); below.
2179 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2180 <limits.h> exists even on freestanding compilers. */
2181
2182#ifdef __STDC__
2183# include <limits.h>
2184#else
2185# include <assert.h>
2186#endif
2187
2188#undef $2
2189
2190/* Override any GCC internal prototype to avoid an error.
2191 Use char because int might match the return type of a GCC
2192 builtin and then its argument prototype would still apply. */
2193#ifdef __cplusplus
2194extern "C"
2195#endif
2196char $2 ();
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined __stub_$2 || defined __stub___$2
2201choke me
2202#endif
2203
2204int
2205main ()
2206{
2207return $2 ();
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_link "$LINENO"; then :
2213 eval "$3=yes"
2214else
2215 eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext \
2218 conftest$ac_exeext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225} # ac_fn_c_check_func
2226
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002227# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2228# ---------------------------------------------
2229# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2230# accordingly.
2231ac_fn_c_check_decl ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 as_decl_name=`echo $2|sed 's/ *(.*//'`
2235 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2237$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2238if eval \${$3+:} false; then :
2239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244int
2245main ()
2246{
2247#ifndef $as_decl_name
2248#ifdef __cplusplus
2249 (void) $as_decl_use;
2250#else
2251 (void) $as_decl_name;
2252#endif
2253#endif
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265fi
2266eval ac_res=\$$3
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2268$as_echo "$ac_res" >&6; }
2269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270
2271} # ac_fn_c_check_decl
2272
Matthias Kloseb9621712010-04-24 17:59:49 +00002273# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2274# ----------------------------------------------------
2275# Tries to find if the field MEMBER exists in type AGGR, after including
2276# INCLUDES, setting cache variable VAR accordingly.
2277ac_fn_c_check_member ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2281$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002282if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$5
2288int
2289main ()
2290{
2291static $2 ac_aggr;
2292if (ac_aggr.$3)
2293return 0;
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$4=yes"
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$5
2304int
2305main ()
2306{
2307static $2 ac_aggr;
2308if (sizeof ac_aggr.$3)
2309return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$4=yes"
2316else
2317 eval "$4=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$4
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002326 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002327
2328} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002330This file contains any messages produced by compilers while
2331running configure, to aid debugging if configure makes a mistake.
2332
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002333It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002334generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
2336 $ $0 $@
2337
2338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002340{
2341cat <<_ASUNAME
2342## --------- ##
2343## Platform. ##
2344## --------- ##
2345
2346hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2347uname -m = `(uname -m) 2>/dev/null || echo unknown`
2348uname -r = `(uname -r) 2>/dev/null || echo unknown`
2349uname -s = `(uname -s) 2>/dev/null || echo unknown`
2350uname -v = `(uname -v) 2>/dev/null || echo unknown`
2351
2352/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2353/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2354
2355/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2356/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2357/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002359/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2360/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2361/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2362
2363_ASUNAME
2364
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002370 $as_echo "PATH: $as_dir"
2371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374} >&5
2375
2376cat >&5 <<_ACEOF
2377
2378
2379## ----------- ##
2380## Core tests. ##
2381## ----------- ##
2382
2383_ACEOF
2384
2385
2386# Keep a trace of the command line.
2387# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002390# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002391ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_configure_args0=
2393ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002394ac_must_keep_next=false
2395for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002396do
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 for ac_arg
2398 do
2399 case $ac_arg in
2400 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2402 | -silent | --silent | --silen | --sile | --sil)
2403 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 esac
2407 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002414 case $ac_arg in
2415 *=* | --config-cache | -C | -disable-* | --disable-* \
2416 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2417 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2418 | -with-* | --with-* | -without-* | --without-* | --x)
2419 case "$ac_configure_args0 " in
2420 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2421 esac
2422 ;;
2423 -* ) ac_must_keep_next=true ;;
2424 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 ;;
2428 esac
2429 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002430done
Matthias Kloseb9621712010-04-24 17:59:49 +00002431{ ac_configure_args0=; unset ac_configure_args0;}
2432{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434# When interrupted or exit'd, cleanup temporary files, and complete
2435# config.log. We remove comments because anyway the quotes in there
2436# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437# WARNING: Use '\'' to represent an apostrophe within the trap.
2438# 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 +00002439trap 'exit_status=$?
2440 # Save into config.log some information that might help in debugging.
2441 {
2442 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002444 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002446## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002481## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 echo
2484 for ac_var in $ac_subst_vars
2485 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 eval ac_val=\$$ac_var
2487 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 done | sort
2492 echo
2493
2494 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_files
2500 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508 fi
2509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
2517 fi
2518 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$as_me: caught signal $ac_signal"
2520 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 rm -f core *.core core.conftest.* &&
2523 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002526for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529ac_signal=0
2530
2531# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
Matthias Kloseb9621712010-04-24 17:59:49 +00002534$as_echo "/* confdefs.h */" > confdefs.h
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536# Predefined preprocessor variables.
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_NAME "$PACKAGE_NAME"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2544_ACEOF
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_VERSION "$PACKAGE_VERSION"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_STRING "$PACKAGE_STRING"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2556_ACEOF
2557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_URL "$PACKAGE_URL"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002564# Prefer an explicitly selected file to automatically selected ones.
2565ac_site_file1=NONE
2566ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568 # We do not want a PATH search for config.site.
2569 case $CONFIG_SITE in #((
2570 -*) ac_site_file1=./$CONFIG_SITE;;
2571 */*) ac_site_file1=$CONFIG_SITE;;
2572 *) ac_site_file1=./$CONFIG_SITE;;
2573 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 . "$ac_site_file" \
2589 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2591as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002592See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$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 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Trent Nelson4d4ec652012-10-16 08:51:24 -04002682
Trent Nelson5595ab52012-10-17 04:47:31 -04002683if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002684 # If we're building out-of-tree, we need to make sure the following
2685 # resources get picked up before their $srcdir counterparts.
2686 # Objects/ -> typeslots.inc
2687 # Include/ -> Python-ast.h, graminit.h
2688 # Python/ -> importlib.h
2689 # (A side effect of this is that these resources will automatically be
2690 # regenerated when building out-of-tree, regardless of whether or not
2691 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2692 # off.)
2693 BASECPPFLAGS="-IObjects -IInclude -IPython"
2694else
2695 BASECPPFLAGS=""
2696fi
2697
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002698
2699
2700
2701
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002702if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703then
2704# Extract the first word of "hg", so it can be a program name with args.
2705set dummy hg; ac_word=$2
2706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2707$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002708if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709 $as_echo_n "(cached) " >&6
2710else
2711 if test -n "$HAS_HG"; then
2712 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2713else
2714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2715for as_dir in $PATH
2716do
2717 IFS=$as_save_IFS
2718 test -z "$as_dir" && as_dir=.
2719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 ac_cv_prog_HAS_HG="found"
2722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2723 break 2
2724 fi
2725done
2726 done
2727IFS=$as_save_IFS
2728
2729 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2730fi
2731fi
2732HAS_HG=$ac_cv_prog_HAS_HG
2733if test -n "$HAS_HG"; then
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2735$as_echo "$HAS_HG" >&6; }
2736else
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2738$as_echo "no" >&6; }
2739fi
2740
2741
2742else
2743HAS_HG=no-repository
2744fi
2745if test $HAS_HG = found
2746then
2747 HGVERSION="hg id -i \$(srcdir)"
2748 HGTAG="hg id -t \$(srcdir)"
2749 HGBRANCH="hg id -b \$(srcdir)"
2750else
2751 HGVERSION=""
2752 HGTAG=""
2753 HGBRANCH=""
2754fi
2755
2756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002757ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
2759
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002760ac_aux_dir=
2761for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2762 if test -f "$ac_dir/install-sh"; then
2763 ac_aux_dir=$ac_dir
2764 ac_install_sh="$ac_aux_dir/install-sh -c"
2765 break
2766 elif test -f "$ac_dir/install.sh"; then
2767 ac_aux_dir=$ac_dir
2768 ac_install_sh="$ac_aux_dir/install.sh -c"
2769 break
2770 elif test -f "$ac_dir/shtool"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/shtool install -c"
2773 break
2774 fi
2775done
2776if test -z "$ac_aux_dir"; then
2777 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2778fi
2779
2780# These three variables are undocumented and unsupported,
2781# and are intended to be withdrawn in a future Autoconf release.
2782# They can cause serious problems if a builder's source tree is in a directory
2783# whose full name contains unusual characters.
2784ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2785ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2786ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2787
2788
2789# Make sure we can run config.sub.
2790$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2791 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2792
2793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2794$as_echo_n "checking build system type... " >&6; }
2795if ${ac_cv_build+:} false; then :
2796 $as_echo_n "(cached) " >&6
2797else
2798 ac_build_alias=$build_alias
2799test "x$ac_build_alias" = x &&
2800 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2801test "x$ac_build_alias" = x &&
2802 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2803ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2804 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2805
2806fi
2807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2808$as_echo "$ac_cv_build" >&6; }
2809case $ac_cv_build in
2810*-*-*) ;;
2811*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2812esac
2813build=$ac_cv_build
2814ac_save_IFS=$IFS; IFS='-'
2815set x $ac_cv_build
2816shift
2817build_cpu=$1
2818build_vendor=$2
2819shift; shift
2820# Remember, the first character of IFS is used to create $*,
2821# except with old shells:
2822build_os=$*
2823IFS=$ac_save_IFS
2824case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2825
2826
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2828$as_echo_n "checking host system type... " >&6; }
2829if ${ac_cv_host+:} false; then :
2830 $as_echo_n "(cached) " >&6
2831else
2832 if test "x$host_alias" = x; then
2833 ac_cv_host=$ac_cv_build
2834else
2835 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2836 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2837fi
2838
2839fi
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2841$as_echo "$ac_cv_host" >&6; }
2842case $ac_cv_host in
2843*-*-*) ;;
2844*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2845esac
2846host=$ac_cv_host
2847ac_save_IFS=$IFS; IFS='-'
2848set x $ac_cv_host
2849shift
2850host_cpu=$1
2851host_vendor=$2
2852shift; shift
2853# Remember, the first character of IFS is used to create $*,
2854# except with old shells:
2855host_os=$*
2856IFS=$ac_save_IFS
2857case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2858
2859
2860
doko@python.orga10e4a92013-01-25 18:45:12 +01002861
2862
Ned Deilyfcbc2462014-08-22 13:32:49 -07002863# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2864rm -f pybuilddir.txt
2865
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002866for ac_prog in python$PACKAGE_VERSION python3 python
2867do
2868 # Extract the first word of "$ac_prog", so it can be a program name with args.
2869set dummy $ac_prog; ac_word=$2
2870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2871$as_echo_n "checking for $ac_word... " >&6; }
2872if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2873 $as_echo_n "(cached) " >&6
2874else
2875 if test -n "$PYTHON_FOR_GEN"; then
2876 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2877else
2878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2879for as_dir in $PATH
2880do
2881 IFS=$as_save_IFS
2882 test -z "$as_dir" && as_dir=.
2883 for ac_exec_ext in '' $ac_executable_extensions; do
2884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2885 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2887 break 2
2888 fi
2889done
2890 done
2891IFS=$as_save_IFS
2892
2893fi
2894fi
2895PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2896if test -n "$PYTHON_FOR_GEN"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2898$as_echo "$PYTHON_FOR_GEN" >&6; }
2899else
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2901$as_echo "no" >&6; }
2902fi
2903
2904
2905 test -n "$PYTHON_FOR_GEN" && break
2906done
2907test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2908
2909if test "$PYTHON_FOR_GEN" = not-found; then
2910 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2911 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2912 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2913fi
2914
2915
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002916if test "$cross_compiling" = yes; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2918$as_echo_n "checking for python interpreter for cross build... " >&6; }
2919 if test -z "$PYTHON_FOR_BUILD"; then
2920 for interp in python$PACKAGE_VERSION python3 python; do
2921 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002922 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002923 break
2924 fi
2925 interp=
2926 done
2927 if test x$interp = x; then
2928 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2929 fi
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2931$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002932 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 +02002933 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002934 # Used to comment out stuff for rebuilding generated files
2935 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002940 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Martin Pantereac67be2016-07-28 01:28:27 +00002945
Benjamin Petersond23f8222009-04-05 19:13:16 +00002946if test "$prefix" != "/"; then
2947 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
2952
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002953# We don't use PACKAGE_ variables, and they cause conflicts
2954# with other autoconf-based packages that include Python.h
2955grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2956rm confdefs.h
2957mv confdefs.h.new confdefs.h
2958
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002959
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002960VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002961
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002962# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002963
2964SOVERSION=1.0
2965
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966# The later defininition of _XOPEN_SOURCE disables certain features
2967# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970
2971
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977
2978
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984
2985
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002990
2991
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2993# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2994# them.
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997
2998
2999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003000define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003001
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003002# Arguments passed to configure.
3003
3004CONFIG_ARGS="$ac_configure_args"
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3007$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003008# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003009if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003010 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011 case $enableval in
3012 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003013 # Locate the best usable SDK, see Mac/README.txt for more
3014 # information
3015 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003016 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003017 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3019 if test ! -d "${enableval}"
3020 then
3021 enableval=/
3022 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ;;
3025 esac
3026 case $enableval in
3027 no)
3028 UNIVERSALSDK=
3029 enable_universalsdk=
3030 ;;
3031 *)
3032 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 if test ! -d "${UNIVERSALSDK}"
3034 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003035 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 ;;
3038 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041else
3042
3043 UNIVERSALSDK=
3044 enable_universalsdk=
3045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048if test -n "${UNIVERSALSDK}"
3049then
Matthias Kloseb9621712010-04-24 17:59:49 +00003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3051$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052else
Matthias Kloseb9621712010-04-24 17:59:49 +00003053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3054$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003058
Ned Deily87adb6e2013-10-18 21:09:56 -07003059ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003060
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061# For backward compatibility reasons we prefer to select '32-bit' if available,
3062# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064if test "`uname -s`" = "Darwin"
3065then
3066 if test -n "${UNIVERSALSDK}"
3067 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003068 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069 then
3070 UNIVERSAL_ARCHS="intel"
3071 fi
3072 fi
3073fi
3074
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3077$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078
3079# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003080if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082 UNIVERSAL_ARCHS="$withval"
3083
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084fi
3085
Ned Deily87adb6e2013-10-18 21:09:56 -07003086if test -n "${UNIVERSALSDK}"
3087then
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3089$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3090else
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3092$as_echo "no" >&6; }
3093fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003095
3096# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003097if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003098 withval=$with_framework_name;
3099 PYTHONFRAMEWORK=${withval}
3100 PYTHONFRAMEWORKDIR=${withval}.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3102
3103else
3104
3105 PYTHONFRAMEWORK=Python
3106 PYTHONFRAMEWORKDIR=Python.framework
3107 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3108
3109fi
3110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003112if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003114 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003115 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003116 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 esac
3118 case $enableval in
3119 no)
3120 PYTHONFRAMEWORK=
3121 PYTHONFRAMEWORKDIR=no-framework
3122 PYTHONFRAMEWORKPREFIX=
3123 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124 FRAMEWORKINSTALLFIRST=
3125 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 FRAMEWORKALTINSTALLFIRST=
3127 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003128 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003129 if test "x${prefix}" = "xNONE"; then
3130 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3131 else
3132 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3133 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003135 ;;
3136 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003139 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003140 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003141 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3142 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003143 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003145
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003146 if test "x${prefix}" = "xNONE" ; then
3147 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003149 else
3150 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3151 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152
3153 case "${enableval}" in
3154 /System*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 if test "${prefix}" = "NONE" ; then
3157 # See below
3158 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3159 fi
3160 ;;
3161
3162 /Library*)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 ;;
3165
3166 */Library/Frameworks)
3167 MDIR="`dirname "${enableval}"`"
3168 MDIR="`dirname "${MDIR}"`"
3169 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3170
3171 if test "${prefix}" = "NONE"; then
3172 # User hasn't specified the
3173 # --prefix option, but wants to install
3174 # the framework in a non-default location,
3175 # ensure that the compatibility links get
3176 # installed relative to that prefix as well
3177 # instead of in /usr/local.
3178 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3179 fi
3180 ;;
3181
3182 *)
3183 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3184 ;;
3185 esac
3186
Jack Jansen127e56e2001-09-11 14:41:54 +00003187 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003195 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3196
3197 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3198
Jack Jansene578a632001-08-15 01:27:14 +00003199 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Guido van Rossum563e7081996-09-10 18:20:48 +00003201else
Martin v. Löwis11437992002-04-12 09:54:03 +00003202
Jack Jansene578a632001-08-15 01:27:14 +00003203 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003204 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003205 PYTHONFRAMEWORKPREFIX=
3206 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003207 FRAMEWORKINSTALLFIRST=
3208 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 FRAMEWORKALTINSTALLFIRST=
3210 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003211 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003212 if test "x${prefix}" = "xNONE" ; then
3213 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3214 else
3215 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3216 fi
Jack Jansene578a632001-08-15 01:27:14 +00003217 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003218
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220fi
3221
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
3223
Michael W. Hudson54241132001-12-07 15:38:26 +00003224
3225
3226
3227
Jack Jansene578a632001-08-15 01:27:14 +00003228
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003229
3230
3231
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003232
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003233
Ned Deilyb8f944f2013-11-21 22:42:25 -08003234
Jack Jansene578a632001-08-15 01:27:14 +00003235##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003236## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003237## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003238##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239# Set name for machine-dependent library files
3240
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3242$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243if test -z "$MACHDEP"
3244then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 # avoid using uname for cross builds
3246 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003247 # ac_sys_system and ac_sys_release are used for setting
3248 # a lot of different things including 'define_xopen_source'
3249 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 case "$host" in
3251 *-*-linux*)
3252 ac_sys_system=Linux
3253 ;;
3254 *-*-cygwin*)
3255 ac_sys_system=Cygwin
3256 ;;
3257 *)
3258 # for now, limit cross builds to known configurations
3259 MACHDEP="unknown"
3260 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3261 esac
3262 ac_sys_release=
3263 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003264 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003265 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003266 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003267 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003271 fi
3272 ac_md_system=`echo $ac_sys_system |
3273 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3274 ac_md_release=`echo $ac_sys_release |
3275 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3276 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003277
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003279 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003280 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003281 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003282 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 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 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On FreeBSD 4, the math functions C89 does not cover are never defined
3364 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3365 FreeBSD/4.*)
3366 define_xopen_source=no;;
3367 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3368 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3369 # identifies itself as Darwin/7.*
3370 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # disables platform specific features beyond repair.
3372 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # has no effect, don't bother defining them
3374 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003375 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003376 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003377 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003378 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3379 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3380 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003381 AIX/4)
3382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 AIX/5)
3384 if test `uname -r` -eq 1; then
3385 define_xopen_source=no
3386 fi
3387 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003388 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3389 # defining NI_NUMERICHOST.
3390 QNX/6.3.2)
3391 define_xopen_source=no
3392 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394esac
3395
3396if test $define_xopen_source = yes
3397then
Victor Stinner14d098d2011-09-07 22:29:43 +02003398 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Victor Stinner14d098d2011-09-07 22:29:43 +02003400$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
3403 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3404 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3405 # several APIs are not declared. Since this is also needed in some
3406 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Matthias Kloseb9621712010-04-24 17:59:49 +00003408$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
3410
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003411
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003412$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414fi
3415
Christian Heimes647cd872013-12-07 23:39:33 +01003416# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3417case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003418 hp*|HP*)
3419 define_stdc_a1=yes;;
3420 *)
3421 define_stdc_a1=no;;
3422esac
3423
3424if test $define_stdc_a1 = yes
3425then
Christian Heimes647cd872013-12-07 23:39:33 +01003426
3427$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3428
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429fi
Christian Heimes647cd872013-12-07 23:39:33 +01003430
Guido van Rossum91922671997-10-09 20:24:13 +00003431#
3432# SGI compilers allow the specification of the both the ABI and the
3433# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003434# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003435#
3436# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3437# thus supply support for various ABI/ISA combinations. The MACHDEP
3438# variable is also adjusted.
3439#
3440
3441if test ! -z "$SGI_ABI"
3442then
3443 CC="cc $SGI_ABI"
3444 LDFLAGS="$SGI_ABI $LDFLAGS"
3445 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3448$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3451# it may influence the way we can build extensions, so distutils
3452# needs to check it
3453
Thomas Wouters477c8d52006-05-27 19:21:47 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003457
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003459
3460# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3461# for debug/optimization stuff. BASECFLAGS is for flags that are required
3462# just to get things to compile and link. Users are free to override OPT
3463# when running configure or make. The build should not break if they do.
3464# BASECFLAGS should generally not be messed with, however.
3465
3466# XXX shouldn't some/most/all of this code be merged with the stuff later
3467# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3469$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003472if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003474 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003475 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476 without_gcc=yes;;
3477 yes) CC=gcc
3478 without_gcc=no;;
3479 *) CC=$withval
3480 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003481 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003484 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003485 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003486 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003487 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003488 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489fi
3490
Matthias Kloseb9621712010-04-24 17:59:49 +00003491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3492$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003493
Zachary Ware5af85642015-12-21 12:09:17 -06003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3495$as_echo_n "checking for --with-icc... " >&6; }
3496
3497# Check whether --with-icc was given.
3498if test "${with_icc+set}" = set; then :
3499 withval=$with_icc;
3500 case $withval in
3501 no) CC=${CC:-cc}
3502 with_icc=no;;
3503 yes) CC=icc
3504 CXX=icpc
3505 with_icc=yes;;
3506 *) CC=$withval
3507 with_icc=$withval;;
3508 esac
3509else
3510
3511 with_icc=no
3512fi
3513
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3515$as_echo "$with_icc" >&6; }
3516
Guido van Rossum8b131c51995-03-09 14:10:13 +00003517# If the user switches compilers, we can't believe the cache
3518if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3519then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003520 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003521(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522fi
3523
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003524# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3525# when the compiler supports them, but we don't always want -O2, and
3526# we set -g later.
3527if test -z "$CFLAGS"; then
3528 CFLAGS=
3529fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530
3531if test "$ac_sys_system" = "Darwin"
3532then
3533 # Compiler selection on MacOSX is more complicated than
3534 # AC_PROG_CC can handle, see Mac/README.txt for more
3535 # information
3536 if test -z "${CC}"
3537 then
3538 found_gcc=
3539 found_clang=
3540 as_save_IFS=$IFS; IFS=:
3541 for as_dir in $PATH
3542 do
3543 IFS=$as_save_IFS
3544 if test -x $as_dir/gcc; then
3545 if test -z "${found_gcc}"; then
3546 found_gcc=$as_dir/gcc
3547 fi
3548 fi
3549 if test -x $as_dir/clang; then
3550 if test -z "${found_clang}"; then
3551 found_clang=$as_dir/clang
3552 fi
3553 fi
3554 done
3555 IFS=$as_save_IFS
3556
3557 if test -n "$found_gcc" -a -n "$found_clang"
3558 then
3559 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3562$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3563 CC="$found_clang"
3564 CXX="$found_clang++"
3565 fi
3566
3567
3568 elif test -z "$found_gcc" -a -n "$found_clang"
3569 then
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3571$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3572 CC="$found_clang"
3573 CXX="$found_clang++"
3574
3575 elif test -z "$found_gcc" -a -z "$found_clang"
3576 then
3577 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3578 if test -n "${found_clang}"
3579 then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3581$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3582 CC="${found_clang}"
3583 CXX="`/usr/bin/xcrun -find clang++`"
3584
3585 # else: use default behaviour
3586 fi
3587 fi
3588 fi
3589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003590ac_ext=c
3591ac_cpp='$CPP $CPPFLAGS'
3592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_c_compiler_gnu
3595if test -n "$ac_tool_prefix"; then
3596 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3597set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3599$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003600if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003602else
3603 if test -n "$CC"; then
3604 ac_cv_prog_CC="$CC" # Let the user override the test.
3605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3607for as_dir in $PATH
3608do
3609 IFS=$as_save_IFS
3610 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $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 +00003615 break 2
3616 fi
3617done
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003620
Jack Jansendd19cf82001-12-06 22:36:17 +00003621fi
3622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003623CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003624if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3626$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003627else
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3629$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003630fi
3631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633fi
3634if test -z "$ac_cv_prog_CC"; then
3635 ac_ct_CC=$CC
3636 # Extract the first word of "gcc", so it can be a program name with args.
3637set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3639$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003640if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
3643 if test -n "$ac_ct_CC"; then
3644 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3645else
3646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3647for as_dir in $PATH
3648do
3649 IFS=$as_save_IFS
3650 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $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 +00003655 break 2
3656 fi
3657done
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003660
3661fi
3662fi
3663ac_ct_CC=$ac_cv_prog_ac_ct_CC
3664if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3666$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3669$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test "x$ac_ct_CC" = x; then
3673 CC=""
3674 else
3675 case $cross_compiling:$ac_tool_warned in
3676yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679ac_tool_warned=yes ;;
3680esac
3681 CC=$ac_ct_CC
3682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683else
3684 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003685fi
3686
Jack Jansendd19cf82001-12-06 22:36:17 +00003687if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 if test -n "$ac_tool_prefix"; then
3689 # 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 +00003690set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3692$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003693if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003695else
3696 if test -n "$CC"; then
3697 ac_cv_prog_CC="$CC" # Let the user override the test.
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3700for as_dir in $PATH
3701do
3702 IFS=$as_save_IFS
3703 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $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 +00003708 break 2
3709 fi
3710done
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003713
3714fi
3715fi
3716CC=$ac_cv_prog_CC
3717if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3719$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003720else
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3722$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723fi
3724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003727fi
3728if test -z "$CC"; then
3729 # Extract the first word of "cc", so it can be a program name with args.
3730set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003733if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003735else
3736 if test -n "$CC"; then
3737 ac_cv_prog_CC="$CC" # Let the user override the test.
3738else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3741for as_dir in $PATH
3742do
3743 IFS=$as_save_IFS
3744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3748 ac_prog_rejected=yes
3749 continue
3750 fi
3751 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $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 +00003753 break 2
3754 fi
3755done
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759if test $ac_prog_rejected = yes; then
3760 # We found a bogon in the path, so make sure we never use it.
3761 set dummy $ac_cv_prog_CC
3762 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764 # We chose a different compiler from the bogus one.
3765 # However, it has the same basename, so the bogon will be chosen
3766 # first if we set CC to just the basename; use the full file name.
3767 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003768 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 fi
3770fi
3771fi
3772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003773CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3776$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777else
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3779$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780fi
3781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
3784if test -z "$CC"; then
3785 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 do
3788 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003794else
3795 if test -n "$CC"; then
3796 ac_cv_prog_CC="$CC" # Let the user override the test.
3797else
Martin v. Löwis11437992002-04-12 09:54:03 +00003798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $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 +00003807 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
3813fi
3814fi
3815CC=$ac_cv_prog_CC
3816if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3818$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003822fi
3823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$CC" && break
3826 done
3827fi
3828if test -z "$CC"; then
3829 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003831do
3832 # Extract the first word of "$ac_prog", so it can be a program name with args.
3833set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3835$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003836if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003838else
3839 if test -n "$ac_ct_CC"; then
3840 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3841else
3842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3843for as_dir in $PATH
3844do
3845 IFS=$as_save_IFS
3846 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $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 +00003851 break 2
3852 fi
3853done
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858fi
3859ac_ct_CC=$ac_cv_prog_ac_ct_CC
3860if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3862$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863else
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 test -n "$ac_ct_CC" && break
3870done
Michael W. Hudson54241132001-12-07 15:38:26 +00003871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872 if test "x$ac_ct_CC" = x; then
3873 CC=""
3874 else
3875 case $cross_compiling:$ac_tool_warned in
3876yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_tool_warned=yes ;;
3880esac
3881 CC=$ac_ct_CC
3882 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003883fi
3884
3885fi
3886
3887
Matthias Kloseb9621712010-04-24 17:59:49 +00003888test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003890as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003891See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892
3893# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3895set X $ac_compile
3896ac_compiler=$2
3897for ac_option in --version -v -V -qversion; do
3898 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899case "(($ac_try" in
3900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3901 *) ac_try_echo=$ac_try;;
3902esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3904$as_echo "$ac_try_echo"; } >&5
3905 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 if test -s conftest.err; then
3908 sed '10a\
3909... rest of stderr output deleted ...
3910 10q' conftest.err >conftest.er1
3911 cat conftest.er1 >&5
3912 fi
3913 rm -f conftest.er1 conftest.err
3914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3915 test $ac_status = 0; }
3916done
Martin v. Löwis11437992002-04-12 09:54:03 +00003917
Matthias Kloseb9621712010-04-24 17:59:49 +00003918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003919/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003920
Martin v. Löwis11437992002-04-12 09:54:03 +00003921int
3922main ()
3923{
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
3929ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003930ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003931# Try to create an executable without -o first, disregard a.out.
3932# It will help us diagnose broken compilers, and finding out an intuition
3933# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3935$as_echo_n "checking whether the C compiler works... " >&6; }
3936ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3937
3938# The possible output files:
3939ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941ac_rmfiles=
3942for ac_file in $ac_files
3943do
3944 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3947 esac
3948done
3949rm -f $ac_rmfiles
3950
Matthias Kloseb9621712010-04-24 17:59:49 +00003951if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952case "(($ac_try" in
3953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3954 *) ac_try_echo=$ac_try;;
3955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3957$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3963# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3964# in a Makefile. We should not override ac_cv_exeext if it was cached,
3965# so that the user can short-circuit this test for compilers unknown to
3966# Autoconf.
3967for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003968do
3969 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 ;;
3973 [ab].out )
3974 # We found the default executable, but exeext='' is most
3975 # certainly right.
3976 break;;
3977 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 then :; else
3980 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3981 fi
3982 # We set ac_cv_exeext here because the later test for it is not
3983 # safe: cross compilers may not add the suffix if given an `-o'
3984 # argument, so we may need to know it at that point already.
3985 # Even if this section looks crufty: it has the advantage of
3986 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987 break;;
3988 * )
3989 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 esac
3991done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992test "$ac_cv_exeext" = no && ac_cv_exeext=
3993
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003994else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 ac_file=''
3996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003997if test -z "$ac_file"; then :
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3999$as_echo "no" >&6; }
4000$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004001sed 's/^/| /' conftest.$ac_ext >&5
4002
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004005as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004006See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004007else
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4009$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4012$as_echo_n "checking for C compiler default output file name... " >&6; }
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4014$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4020$as_echo_n "checking for suffix of executables... " >&6; }
4021if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4033# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4034# work properly (i.e., refer to `conftest.exe'), while it won't with
4035# `rm'.
4036for ac_file in conftest.exe conftest conftest.*; do
4037 test -f "$ac_file" || continue
4038 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004040 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4041 break;;
4042 * ) break;;
4043 esac
4044done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004048as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004049See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004051rm -f conftest conftest$ac_cv_exeext
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4053$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054
4055rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004056EXEEXT=$ac_cv_exeext
4057ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4059/* end confdefs.h. */
4060#include <stdio.h>
4061int
4062main ()
4063{
4064FILE *f = fopen ("conftest.out", "w");
4065 return ferror (f) || fclose (f) != 0;
4066
4067 ;
4068 return 0;
4069}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004071ac_clean_files="$ac_clean_files conftest.out"
4072# Check that the compiler produces executables we can run. If not, either
4073# the compiler is broken, or we cross compile.
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4075$as_echo_n "checking whether we are cross compiling... " >&6; }
4076if test "$cross_compiling" != yes; then
4077 { { ac_try="$ac_link"
4078case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
4082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
4084 (eval "$ac_link") 2>&5
4085 ac_status=$?
4086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }
4088 if { ac_try='./conftest$ac_cv_exeext'
4089 { { case "(($ac_try" in
4090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4091 *) ac_try_echo=$ac_try;;
4092esac
4093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4094$as_echo "$ac_try_echo"; } >&5
4095 (eval "$ac_try") 2>&5
4096 ac_status=$?
4097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4098 test $ac_status = 0; }; }; then
4099 cross_compiling=no
4100 else
4101 if test "$cross_compiling" = maybe; then
4102 cross_compiling=yes
4103 else
4104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004106as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004107If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004108See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 fi
4110 fi
4111fi
4112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4113$as_echo "$cross_compiling" >&6; }
4114
4115rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4116ac_clean_files=$ac_clean_files_save
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4118$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004119if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo_n "(cached) " >&6
4121else
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004123/* end confdefs.h. */
4124
4125int
4126main ()
4127{
4128
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004134if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135case "(($ac_try" in
4136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4137 *) ac_try_echo=$ac_try;;
4138esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4140$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4144 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145 for ac_file in conftest.o conftest.obj conftest.*; do
4146 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4150 break;;
4151 esac
4152done
4153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004155sed 's/^/| /' conftest.$ac_ext >&5
4156
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004159as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004160See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004161fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4165$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166OBJEXT=$ac_cv_objext
4167ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4169$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004170if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004175
Martin v. Löwis11437992002-04-12 09:54:03 +00004176int
4177main ()
4178{
4179#ifndef __GNUC__
4180 choke me
4181#endif
4182
4183 ;
4184 return 0;
4185}
4186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 ac_compiler_gnu=yes
4189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_cv_c_compiler_gnu=$ac_compiler_gnu
4194
4195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4197$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4198if test $ac_compiler_gnu = yes; then
4199 GCC=yes
4200else
4201 GCC=
4202fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_test_CFLAGS=${CFLAGS+set}
4204ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4206$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004207if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004209else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 ac_save_c_werror_flag=$ac_c_werror_flag
4211 ac_c_werror_flag=yes
4212 ac_cv_prog_cc_g=no
4213 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
Martin v. Löwis11437992002-04-12 09:54:03 +00004217int
4218main ()
4219{
4220
4221 ;
4222 return 0;
4223}
4224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004225if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004226 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227else
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 CFLAGS=""
4229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241
Matthias Kloseb9621712010-04-24 17:59:49 +00004242else
4243 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246/* end confdefs.h. */
4247
4248int
4249main ()
4250{
4251
4252 ;
4253 return 0;
4254}
4255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264 ac_c_werror_flag=$ac_save_c_werror_flag
4265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4267$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270elif test $ac_cv_prog_cc_g = yes; then
4271 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004272 CFLAGS="-g -O2"
4273 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004274 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275 fi
4276else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004277 if test "$GCC" = yes; then
4278 CFLAGS="-O2"
4279 else
4280 CFLAGS=
4281 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4284$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004285if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004289ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* end confdefs.h. */
4292#include <stdarg.h>
4293#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004294struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4296struct buf { int x; };
4297FILE * (*rcsopen) (struct buf *, struct stat *, int);
4298static char *e (p, i)
4299 char **p;
4300 int i;
4301{
4302 return p[i];
4303}
4304static char *f (char * (*g) (char **, int), char **p, ...)
4305{
4306 char *s;
4307 va_list v;
4308 va_start (v,p);
4309 s = g (p, va_arg (v,int));
4310 va_end (v);
4311 return s;
4312}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313
4314/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4315 function prototypes and stuff, but not '\xHH' hex character constants.
4316 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4319 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4324 inside strings and character constants. */
4325#define FOO(x) 'x'
4326int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4327
Skip Montanaro6dead952003-09-25 14:50:04 +00004328int test (int i, double x);
4329struct s1 {int (*f) (int a);};
4330struct s2 {int (*f) (double a);};
4331int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4332int argc;
4333char **argv;
4334int
4335main ()
4336{
4337return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4338 ;
4339 return 0;
4340}
4341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4343 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004344do
4345 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349rm -f core conftest.err conftest.$ac_objext
4350 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004351done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004353CC=$ac_save_CC
4354
4355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356# AC_CACHE_VAL
4357case "x$ac_cv_prog_cc_c89" in
4358 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4360$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4363$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004364 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4367$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004368esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004369if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004370
Matthias Kloseb9621712010-04-24 17:59:49 +00004371fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Martin v. Löwis11437992002-04-12 09:54:03 +00004373ac_ext=c
4374ac_cpp='$CPP $CPPFLAGS'
4375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4377ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004379ac_ext=c
4380ac_cpp='$CPP $CPPFLAGS'
4381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4383ac_compiler_gnu=$ac_cv_c_compiler_gnu
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4385$as_echo_n "checking how to run the C preprocessor... " >&6; }
4386# On Suns, sometimes $CPP names a directory.
4387if test -n "$CPP" && test -d "$CPP"; then
4388 CPP=
4389fi
4390if test -z "$CPP"; then
4391 if ${ac_cv_prog_CPP+:} false; then :
4392 $as_echo_n "(cached) " >&6
4393else
4394 # Double quotes because CPP needs to be expanded
4395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4396 do
4397 ac_preproc_ok=false
4398for ac_c_preproc_warn_flag in '' yes
4399do
4400 # Use a header file that comes with gcc, so configuring glibc
4401 # with a fresh cross-compiler works.
4402 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4403 # <limits.h> exists even on freestanding compilers.
4404 # On the NeXT, cc -E runs the code through the compiler's parser,
4405 # not just through cpp. "Syntax error" is here to catch this case.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#ifdef __STDC__
4409# include <limits.h>
4410#else
4411# include <assert.h>
4412#endif
4413 Syntax error
4414_ACEOF
4415if ac_fn_c_try_cpp "$LINENO"; then :
4416
4417else
4418 # Broken: fails on valid input.
4419continue
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423 # OK, works on sane cases. Now check whether nonexistent headers
4424 # can be detected and how.
4425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4426/* end confdefs.h. */
4427#include <ac_nonexistent.h>
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430 # Broken: success on invalid input.
4431continue
4432else
4433 # Passes both tests.
4434ac_preproc_ok=:
4435break
4436fi
4437rm -f conftest.err conftest.i conftest.$ac_ext
4438
4439done
4440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4441rm -f conftest.i conftest.err conftest.$ac_ext
4442if $ac_preproc_ok; then :
4443 break
4444fi
4445
4446 done
4447 ac_cv_prog_CPP=$CPP
4448
4449fi
4450 CPP=$ac_cv_prog_CPP
4451else
4452 ac_cv_prog_CPP=$CPP
4453fi
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4455$as_echo "$CPP" >&6; }
4456ac_preproc_ok=false
4457for ac_c_preproc_warn_flag in '' yes
4458do
4459 # Use a header file that comes with gcc, so configuring glibc
4460 # with a fresh cross-compiler works.
4461 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4462 # <limits.h> exists even on freestanding compilers.
4463 # On the NeXT, cc -E runs the code through the compiler's parser,
4464 # not just through cpp. "Syntax error" is here to catch this case.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#ifdef __STDC__
4468# include <limits.h>
4469#else
4470# include <assert.h>
4471#endif
4472 Syntax error
4473_ACEOF
4474if ac_fn_c_try_cpp "$LINENO"; then :
4475
4476else
4477 # Broken: fails on valid input.
4478continue
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482 # OK, works on sane cases. Now check whether nonexistent headers
4483 # can be detected and how.
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <ac_nonexistent.h>
4487_ACEOF
4488if ac_fn_c_try_cpp "$LINENO"; then :
4489 # Broken: success on invalid input.
4490continue
4491else
4492 # Passes both tests.
4493ac_preproc_ok=:
4494break
4495fi
4496rm -f conftest.err conftest.i conftest.$ac_ext
4497
4498done
4499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4500rm -f conftest.i conftest.err conftest.$ac_ext
4501if $ac_preproc_ok; then :
4502
4503else
4504 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4506as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4507See \`config.log' for more details" "$LINENO" 5; }
4508fi
4509
4510ac_ext=c
4511ac_cpp='$CPP $CPPFLAGS'
4512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4514ac_compiler_gnu=$ac_cv_c_compiler_gnu
4515
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4517$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4518if ${ac_cv_path_GREP+:} false; then :
4519 $as_echo_n "(cached) " >&6
4520else
4521 if test -z "$GREP"; then
4522 ac_path_GREP_found=false
4523 # Loop through the user's path and test for each of PROGNAME-LIST
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4526do
4527 IFS=$as_save_IFS
4528 test -z "$as_dir" && as_dir=.
4529 for ac_prog in grep ggrep; do
4530 for ac_exec_ext in '' $ac_executable_extensions; do
4531 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4532 as_fn_executable_p "$ac_path_GREP" || continue
4533# Check for GNU ac_path_GREP and select it if it is found.
4534 # Check for GNU $ac_path_GREP
4535case `"$ac_path_GREP" --version 2>&1` in
4536*GNU*)
4537 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4538*)
4539 ac_count=0
4540 $as_echo_n 0123456789 >"conftest.in"
4541 while :
4542 do
4543 cat "conftest.in" "conftest.in" >"conftest.tmp"
4544 mv "conftest.tmp" "conftest.in"
4545 cp "conftest.in" "conftest.nl"
4546 $as_echo 'GREP' >> "conftest.nl"
4547 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4548 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4549 as_fn_arith $ac_count + 1 && ac_count=$as_val
4550 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4551 # Best one so far, save it but keep looking for a better one
4552 ac_cv_path_GREP="$ac_path_GREP"
4553 ac_path_GREP_max=$ac_count
4554 fi
4555 # 10*(2^10) chars as input seems more than enough
4556 test $ac_count -gt 10 && break
4557 done
4558 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4559esac
4560
4561 $ac_path_GREP_found && break 3
4562 done
4563 done
4564 done
4565IFS=$as_save_IFS
4566 if test -z "$ac_cv_path_GREP"; then
4567 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4568 fi
4569else
4570 ac_cv_path_GREP=$GREP
4571fi
4572
4573fi
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4575$as_echo "$ac_cv_path_GREP" >&6; }
4576 GREP="$ac_cv_path_GREP"
4577
4578
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004579
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004580
4581
Matthias Kloseb9621712010-04-24 17:59:49 +00004582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4583$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004585# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004586if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004587 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588
4589 case $withval in
4590 no) with_cxx_main=no
4591 MAINCC='$(CC)';;
4592 yes) with_cxx_main=yes
4593 MAINCC='$(CXX)';;
4594 *) with_cxx_main=yes
4595 MAINCC=$withval
4596 if test -z "$CXX"
4597 then
4598 CXX=$withval
4599 fi;;
4600 esac
4601else
4602
4603 with_cxx_main=no
4604 MAINCC='$(CC)'
4605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004606fi
4607
Matthias Kloseb9621712010-04-24 17:59:49 +00004608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4609$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
4611preset_cxx="$CXX"
4612if test -z "$CXX"
4613then
4614 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004615 gcc) if test -n "$ac_tool_prefix"; then
4616 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4617set dummy ${ac_tool_prefix}g++; ac_word=$2
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619$as_echo_n "checking for $ac_word... " >&6; }
4620if ${ac_cv_path_CXX+:} false; then :
4621 $as_echo_n "(cached) " >&6
4622else
4623 case $CXX in
4624 [\\/]* | ?:[\\/]*)
4625 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4626 ;;
4627 *)
4628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in notfound
4630do
4631 IFS=$as_save_IFS
4632 test -z "$as_dir" && as_dir=.
4633 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004635 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637 break 2
4638 fi
4639done
4640 done
4641IFS=$as_save_IFS
4642
4643 ;;
4644esac
4645fi
4646CXX=$ac_cv_path_CXX
4647if test -n "$CXX"; then
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4649$as_echo "$CXX" >&6; }
4650else
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654
4655
4656fi
4657if test -z "$ac_cv_path_CXX"; then
4658 ac_pt_CXX=$CXX
4659 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004663if ${ac_cv_path_ac_pt_CXX+:} false; then :
4664 $as_echo_n "(cached) " >&6
4665else
4666 case $ac_pt_CXX in
4667 [\\/]* | ?:[\\/]*)
4668 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4669 ;;
4670 *)
4671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4672for as_dir in notfound
4673do
4674 IFS=$as_save_IFS
4675 test -z "$as_dir" && as_dir=.
4676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4680 break 2
4681 fi
4682done
4683 done
4684IFS=$as_save_IFS
4685
4686 ;;
4687esac
4688fi
4689ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4690if test -n "$ac_pt_CXX"; then
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4692$as_echo "$ac_pt_CXX" >&6; }
4693else
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4695$as_echo "no" >&6; }
4696fi
4697
4698 if test "x$ac_pt_CXX" = x; then
4699 CXX="g++"
4700 else
4701 case $cross_compiling:$ac_tool_warned in
4702yes:)
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4705ac_tool_warned=yes ;;
4706esac
4707 CXX=$ac_pt_CXX
4708 fi
4709else
4710 CXX="$ac_cv_path_CXX"
4711fi
4712 ;;
4713 cc) if test -n "$ac_tool_prefix"; then
4714 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4715set dummy ${ac_tool_prefix}c++; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004718if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720else
4721 case $CXX in
4722 [\\/]* | ?:[\\/]*)
4723 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4724 ;;
4725 *)
4726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in notfound
4728do
4729 IFS=$as_save_IFS
4730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004735 break 2
4736 fi
4737done
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004739IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741 ;;
4742esac
4743fi
4744CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004745if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4747$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004748else
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004752
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753
4754fi
4755if test -z "$ac_cv_path_CXX"; then
4756 ac_pt_CXX=$CXX
4757 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766 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 +00004767 ;;
4768 *)
4769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in notfound
4771do
4772 IFS=$as_save_IFS
4773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778 break 2
4779 fi
4780done
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004782IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784 ;;
4785esac
4786fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4788if test -n "$ac_pt_CXX"; then
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4790$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004791else
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4793$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004795
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 if test "x$ac_pt_CXX" = x; then
4797 CXX="c++"
4798 else
4799 case $cross_compiling:$ac_tool_warned in
4800yes:)
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4803ac_tool_warned=yes ;;
4804esac
4805 CXX=$ac_pt_CXX
4806 fi
4807else
4808 CXX="$ac_cv_path_CXX"
4809fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 clang|*/clang) if test -n "$ac_tool_prefix"; then
4812 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4813set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
4816if ${ac_cv_path_CXX+:} false; then :
4817 $as_echo_n "(cached) " >&6
4818else
4819 case $CXX in
4820 [\\/]* | ?:[\\/]*)
4821 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4822 ;;
4823 *)
4824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in notfound
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
4829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004831 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2
4834 fi
4835done
4836 done
4837IFS=$as_save_IFS
4838
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839 ;;
4840esac
4841fi
4842CXX=$ac_cv_path_CXX
4843if test -n "$CXX"; then
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4845$as_echo "$CXX" >&6; }
4846else
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848$as_echo "no" >&6; }
4849fi
4850
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851
4852fi
4853if test -z "$ac_cv_path_CXX"; then
4854 ac_pt_CXX=$CXX
4855 # Extract the first word of "clang++", so it can be a program name with args.
4856set dummy clang++; ac_word=$2
4857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4858$as_echo_n "checking for $ac_word... " >&6; }
4859if ${ac_cv_path_ac_pt_CXX+:} false; then :
4860 $as_echo_n "(cached) " >&6
4861else
4862 case $ac_pt_CXX in
4863 [\\/]* | ?:[\\/]*)
4864 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4865 ;;
4866 *)
4867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4868for as_dir in notfound
4869do
4870 IFS=$as_save_IFS
4871 test -z "$as_dir" && as_dir=.
4872 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004873 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004874 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4876 break 2
4877 fi
4878done
4879 done
4880IFS=$as_save_IFS
4881
4882 ;;
4883esac
4884fi
4885ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4886if test -n "$ac_pt_CXX"; then
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4888$as_echo "$ac_pt_CXX" >&6; }
4889else
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893
4894 if test "x$ac_pt_CXX" = x; then
4895 CXX="clang++"
4896 else
4897 case $cross_compiling:$ac_tool_warned in
4898yes:)
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4900$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4901ac_tool_warned=yes ;;
4902esac
4903 CXX=$ac_pt_CXX
4904 fi
4905else
4906 CXX="$ac_cv_path_CXX"
4907fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004908 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004909 icc|*/icc) if test -n "$ac_tool_prefix"; then
4910 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4911set dummy ${ac_tool_prefix}icpc; ac_word=$2
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913$as_echo_n "checking for $ac_word... " >&6; }
4914if ${ac_cv_path_CXX+:} false; then :
4915 $as_echo_n "(cached) " >&6
4916else
4917 case $CXX in
4918 [\\/]* | ?:[\\/]*)
4919 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4920 ;;
4921 *)
4922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in notfound
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4929 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937 ;;
4938esac
4939fi
4940CXX=$ac_cv_path_CXX
4941if test -n "$CXX"; then
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4943$as_echo "$CXX" >&6; }
4944else
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4946$as_echo "no" >&6; }
4947fi
4948
4949
4950fi
4951if test -z "$ac_cv_path_CXX"; then
4952 ac_pt_CXX=$CXX
4953 # Extract the first word of "icpc", so it can be a program name with args.
4954set dummy icpc; ac_word=$2
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956$as_echo_n "checking for $ac_word... " >&6; }
4957if ${ac_cv_path_ac_pt_CXX+:} false; then :
4958 $as_echo_n "(cached) " >&6
4959else
4960 case $ac_pt_CXX in
4961 [\\/]* | ?:[\\/]*)
4962 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4963 ;;
4964 *)
4965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966for as_dir in notfound
4967do
4968 IFS=$as_save_IFS
4969 test -z "$as_dir" && as_dir=.
4970 for ac_exec_ext in '' $ac_executable_extensions; do
4971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4972 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4974 break 2
4975 fi
4976done
4977 done
4978IFS=$as_save_IFS
4979
4980 ;;
4981esac
4982fi
4983ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4984if test -n "$ac_pt_CXX"; then
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4986$as_echo "$ac_pt_CXX" >&6; }
4987else
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
4990fi
4991
4992 if test "x$ac_pt_CXX" = x; then
4993 CXX="icpc"
4994 else
4995 case $cross_compiling:$ac_tool_warned in
4996yes:)
4997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4999ac_tool_warned=yes ;;
5000esac
5001 CXX=$ac_pt_CXX
5002 fi
5003else
5004 CXX="$ac_cv_path_CXX"
5005fi
5006 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005007 esac
5008 if test "$CXX" = "notfound"
5009 then
5010 CXX=""
5011 fi
5012fi
5013if test -z "$CXX"
5014then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005015 if test -n "$ac_tool_prefix"; then
5016 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5017 do
5018 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005022if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005024else
5025 if test -n "$CXX"; then
5026 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5027else
5028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005035 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037 break 2
5038 fi
5039done
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042
5043fi
5044fi
5045CXX=$ac_cv_prog_CXX
5046if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5048$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049else
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005052fi
5053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005055 test -n "$CXX" && break
5056 done
5057fi
5058if test -z "$CXX"; then
5059 ac_ct_CXX=$CXX
5060 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5061do
5062 # Extract the first word of "$ac_prog", so it can be a program name with args.
5063set dummy $ac_prog; ac_word=$2
5064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5065$as_echo_n "checking for $ac_word... " >&6; }
5066if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5067 $as_echo_n "(cached) " >&6
5068else
5069 if test -n "$ac_ct_CXX"; then
5070 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5071else
5072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075 IFS=$as_save_IFS
5076 test -z "$as_dir" && as_dir=.
5077 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005079 ac_cv_prog_ac_ct_CXX="$ac_prog"
5080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5081 break 2
5082 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005083done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 done
5085IFS=$as_save_IFS
5086
5087fi
5088fi
5089ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5090if test -n "$ac_ct_CXX"; then
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5092$as_echo "$ac_ct_CXX" >&6; }
5093else
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099 test -n "$ac_ct_CXX" && break
5100done
5101
5102 if test "x$ac_ct_CXX" = x; then
5103 CXX="notfound"
5104 else
5105 case $cross_compiling:$ac_tool_warned in
5106yes:)
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5109ac_tool_warned=yes ;;
5110esac
5111 CXX=$ac_ct_CXX
5112 fi
5113fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114
5115 if test "$CXX" = "notfound"
5116 then
5117 CXX=""
5118 fi
5119fi
5120if test "$preset_cxx" != "$CXX"
5121then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005122 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123
5124 By default, distutils will build C++ extension modules with \"$CXX\".
5125 If this is not intended, then set CXX on the configure command line.
5126 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005127$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128
5129 By default, distutils will build C++ extension modules with \"$CXX\".
5130 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005131 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132fi
5133
5134
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005135MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5136
5137
5138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5139$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5140cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005141#undef bfin
5142#undef cris
5143#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005144#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005145#undef hppa
5146#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005147#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005148#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005149#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005151#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005152#if defined(__ANDROID__)
5153# if defined(__x86_64__) && defined(__LP64__)
5154 x86_64-linux-android
5155# elif defined(__i386__)
5156 i686-linux-android
5157# elif defined(__aarch64__) && defined(__AARCH64EL__)
5158# if defined(__ILP32__)
5159 aarch64_ilp32-linux-android
5160# else
5161 aarch64-linux-android
5162# endif
5163# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5164 arm-linux-androideabi
5165# elif defined(__mips_hard_float) && defined(_MIPSEL)
5166# if _MIPS_SIM == _ABIO32
5167 mipsel-linux-android
5168# elif _MIPS_SIM == _ABI64
5169 mips64el-linux-android
5170# else
5171# error unknown platform triplet
5172# endif
5173# else
5174# error unknown platform triplet
5175# endif
5176#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005177# if defined(__x86_64__) && defined(__LP64__)
5178 x86_64-linux-gnu
5179# elif defined(__x86_64__) && defined(__ILP32__)
5180 x86_64-linux-gnux32
5181# elif defined(__i386__)
5182 i386-linux-gnu
5183# elif defined(__aarch64__) && defined(__AARCH64EL__)
5184# if defined(__ILP32__)
5185 aarch64_ilp32-linux-gnu
5186# else
5187 aarch64-linux-gnu
5188# endif
5189# elif defined(__aarch64__) && defined(__AARCH64EB__)
5190# if defined(__ILP32__)
5191 aarch64_be_ilp32-linux-gnu
5192# else
5193 aarch64_be-linux-gnu
5194# endif
5195# elif defined(__alpha__)
5196 alpha-linux-gnu
5197# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5198# if defined(__ARMEL__)
5199 arm-linux-gnueabihf
5200# else
5201 armeb-linux-gnueabihf
5202# endif
5203# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5204# if defined(__ARMEL__)
5205 arm-linux-gnueabi
5206# else
5207 armeb-linux-gnueabi
5208# endif
5209# elif defined(__hppa__)
5210 hppa-linux-gnu
5211# elif defined(__ia64__)
5212 ia64-linux-gnu
5213# elif defined(__m68k__) && !defined(__mcoldfire__)
5214 m68k-linux-gnu
5215# elif defined(__mips_hard_float) && defined(_MIPSEL)
5216# if _MIPS_SIM == _ABIO32
5217 mipsel-linux-gnu
5218# elif _MIPS_SIM == _ABIN32
5219 mips64el-linux-gnuabin32
5220# elif _MIPS_SIM == _ABI64
5221 mips64el-linux-gnuabi64
5222# else
5223# error unknown platform triplet
5224# endif
5225# elif defined(__mips_hard_float)
5226# if _MIPS_SIM == _ABIO32
5227 mips-linux-gnu
5228# elif _MIPS_SIM == _ABIN32
5229 mips64-linux-gnuabin32
5230# elif _MIPS_SIM == _ABI64
5231 mips64-linux-gnuabi64
5232# else
5233# error unknown platform triplet
5234# endif
5235# elif defined(__or1k__)
5236 or1k-linux-gnu
5237# elif defined(__powerpc__) && defined(__SPE__)
5238 powerpc-linux-gnuspe
5239# elif defined(__powerpc64__)
5240# if defined(__LITTLE_ENDIAN__)
5241 powerpc64le-linux-gnu
5242# else
5243 powerpc64-linux-gnu
5244# endif
5245# elif defined(__powerpc__)
5246 powerpc-linux-gnu
5247# elif defined(__s390x__)
5248 s390x-linux-gnu
5249# elif defined(__s390__)
5250 s390-linux-gnu
5251# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5252 sh4-linux-gnu
5253# elif defined(__sparc__) && defined(__arch64__)
5254 sparc64-linux-gnu
5255# elif defined(__sparc__)
5256 sparc-linux-gnu
5257# else
5258# error unknown platform triplet
5259# endif
5260#elif defined(__FreeBSD_kernel__)
5261# if defined(__LP64__)
5262 x86_64-kfreebsd-gnu
5263# elif defined(__i386__)
5264 i386-kfreebsd-gnu
5265# else
5266# error unknown platform triplet
5267# endif
5268#elif defined(__gnu_hurd__)
5269 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005270#elif defined(__APPLE__)
5271 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005272#else
5273# error unknown platform triplet
5274#endif
5275
5276EOF
5277
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005278if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005279 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5281$as_echo "$PLATFORM_TRIPLET" >&6; }
5282else
5283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5284$as_echo "none" >&6; }
5285fi
5286rm -f conftest.c conftest.out
5287
5288if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5289 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5290 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5291 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005292elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5293 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005294fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005295if test x$PLATFORM_TRIPLET = x; then
5296 PLATDIR=plat-$MACHDEP
5297else
5298 PLATDIR=plat-$PLATFORM_TRIPLET
5299fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300
5301
doko@ubuntu.com55532312016-06-14 08:55:19 +02005302if test x$MULTIARCH != x; then
5303 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5304fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305
5306
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5308$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5309save_LDFLAGS="$LDFLAGS"
5310LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005311
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313/* end confdefs.h. */
5314
5315int
5316main ()
5317{
5318
5319 ;
5320 return 0;
5321}
5322_ACEOF
5323if ac_fn_c_try_link "$LINENO"; then :
5324 NO_AS_NEEDED="-Wl,--no-as-needed"
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5326$as_echo "yes" >&6; }
5327else
5328 NO_AS_NEEDED=""
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332rm -f core conftest.err conftest.$ac_objext \
5333 conftest$ac_exeext conftest.$ac_ext
5334LDFLAGS="$save_LDFLAGS"
5335
5336
5337
5338# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005339
Matthias Kloseb9621712010-04-24 17:59:49 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5341$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005342if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005343 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344else
5345 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5346 then ac_cv_path_EGREP="$GREP -E"
5347 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 # Loop through the user's path and test for each of PROGNAME-LIST
5351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005352for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5353do
5354 IFS=$as_save_IFS
5355 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 for ac_prog in egrep; do
5357 for ac_exec_ext in '' $ac_executable_extensions; do
5358 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005359 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005360# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361 # Check for GNU $ac_path_EGREP
5362case `"$ac_path_EGREP" --version 2>&1` in
5363*GNU*)
5364 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5365*)
5366 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368 while :
5369 do
5370 cat "conftest.in" "conftest.in" >"conftest.tmp"
5371 mv "conftest.tmp" "conftest.in"
5372 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5375 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5378 # Best one so far, save it but keep looking for a better one
5379 ac_cv_path_EGREP="$ac_path_EGREP"
5380 ac_path_EGREP_max=$ac_count
5381 fi
5382 # 10*(2^10) chars as input seems more than enough
5383 test $ac_count -gt 10 && break
5384 done
5385 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5386esac
5387
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $ac_path_EGREP_found && break 3
5389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005394 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 +00005395 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396else
5397 ac_cv_path_EGREP=$EGREP
5398fi
5399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 fi
5401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5403$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005405
5406
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5408$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005409if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n "(cached) " >&6
5411else
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005413/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005414#include <stdlib.h>
5415#include <stdarg.h>
5416#include <string.h>
5417#include <float.h>
5418
5419int
5420main ()
5421{
5422
5423 ;
5424 return 0;
5425}
5426_ACEOF
5427if ac_fn_c_try_compile "$LINENO"; then :
5428 ac_cv_header_stdc=yes
5429else
5430 ac_cv_header_stdc=no
5431fi
5432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5433
5434if test $ac_cv_header_stdc = yes; then
5435 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5437/* end confdefs.h. */
5438#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005439
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005444else
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005447rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448
Matthias Kloseb9621712010-04-24 17:59:49 +00005449fi
5450
5451if test $ac_cv_header_stdc = yes; then
5452 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5454/* end confdefs.h. */
5455#include <stdlib.h>
5456
5457_ACEOF
5458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5459 $EGREP "free" >/dev/null 2>&1; then :
5460
5461else
5462 ac_cv_header_stdc=no
5463fi
5464rm -f conftest*
5465
5466fi
5467
5468if test $ac_cv_header_stdc = yes; then
5469 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5470 if test "$cross_compiling" = yes; then :
5471 :
5472else
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <ctype.h>
5476#include <stdlib.h>
5477#if ((' ' & 0x0FF) == 0x020)
5478# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5479# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5480#else
5481# define ISLOWER(c) \
5482 (('a' <= (c) && (c) <= 'i') \
5483 || ('j' <= (c) && (c) <= 'r') \
5484 || ('s' <= (c) && (c) <= 'z'))
5485# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5486#endif
5487
5488#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5489int
5490main ()
5491{
5492 int i;
5493 for (i = 0; i < 256; i++)
5494 if (XOR (islower (i), ISLOWER (i))
5495 || toupper (i) != TOUPPER (i))
5496 return 2;
5497 return 0;
5498}
5499_ACEOF
5500if ac_fn_c_try_run "$LINENO"; then :
5501
5502else
5503 ac_cv_header_stdc=no
5504fi
5505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5506 conftest.$ac_objext conftest.beam conftest.$ac_ext
5507fi
5508
5509fi
5510fi
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5512$as_echo "$ac_cv_header_stdc" >&6; }
5513if test $ac_cv_header_stdc = yes; then
5514
5515$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5516
5517fi
5518
5519# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5520for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5521 inttypes.h stdint.h unistd.h
5522do :
5523 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5524ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5525"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005526if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 cat >>confdefs.h <<_ACEOF
5528#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5529_ACEOF
5530
5531fi
5532
5533done
5534
5535
5536
5537 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 +02005538if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005539 MINIX=yes
5540else
5541 MINIX=
5542fi
5543
5544
5545 if test "$MINIX" = yes; then
5546
5547$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5548
5549
5550$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5551
5552
5553$as_echo "#define _MINIX 1" >>confdefs.h
5554
5555 fi
5556
5557
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5559$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005560if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 $as_echo_n "(cached) " >&6
5562else
5563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5564/* end confdefs.h. */
5565
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005566# define __EXTENSIONS__ 1
5567 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005568int
5569main ()
5570{
5571
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576if ac_fn_c_try_compile "$LINENO"; then :
5577 ac_cv_safe_to_define___extensions__=yes
5578else
5579 ac_cv_safe_to_define___extensions__=no
5580fi
5581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582fi
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5584$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5585 test $ac_cv_safe_to_define___extensions__ = yes &&
5586 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5587
5588 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5589
5590 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5591
5592 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5593
5594 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5595
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
Xavier de Gaye95750b12016-07-09 11:05:42 +02005598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5599$as_echo_n "checking for the Android API level... " >&6; }
5600cat >> conftest.c <<EOF
5601#ifdef __ANDROID__
5602#include <android/api-level.h>
5603__ANDROID_API__
5604#else
5605#error not Android
5606#endif
5607EOF
5608
5609if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5610 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5612$as_echo "$ANDROID_API_LEVEL" >&6; }
5613
5614cat >>confdefs.h <<_ACEOF
5615#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5616_ACEOF
5617
5618else
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5620$as_echo "not Android" >&6; }
5621fi
5622rm -f conftest.c conftest.out
5623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624# Check for unsupported systems
5625case $ac_sys_system/$ac_sys_release in
5626atheos*|Linux*/1*)
5627 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5628 echo See README for details.
5629 exit 1;;
5630esac
5631
5632
Matthias Kloseb9621712010-04-24 17:59:49 +00005633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5634$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
5636# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005637if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 withval=$with_suffix;
5639 case $withval in
5640 no) EXEEXT=;;
5641 yes) EXEEXT=.exe;;
5642 *) EXEEXT=$withval;;
5643 esac
5644fi
5645
Matthias Kloseb9621712010-04-24 17:59:49 +00005646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5647$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
5649# Test whether we're running on a non-case-sensitive system, in which
5650# case we give a warning if no ext is given
5651
Matthias Kloseb9621712010-04-24 17:59:49 +00005652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5653$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654if test ! -d CaseSensitiveTestDir; then
5655mkdir CaseSensitiveTestDir
5656fi
5657
5658if test -d casesensitivetestdir
5659then
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5661$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 BUILDEXEEXT=.exe
5663else
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5665$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 BUILDEXEEXT=$EXEEXT
5667fi
5668rmdir CaseSensitiveTestDir
5669
5670case $MACHDEP in
5671bsdos*)
5672 case $CC in
5673 gcc) CC="$CC -D_HAVE_BSDI";;
5674 esac;;
5675esac
5676
5677case $ac_sys_system in
5678hp*|HP*)
5679 case $CC in
5680 cc|*/cc) CC="$CC -Ae";;
5681 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682esac
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5686$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687if test -z "$LIBRARY"
5688then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005689 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5692$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694# LDLIBRARY is the name of the library to link against (as opposed to the
5695# name of the library into which to insert object files). BLDLIBRARY is also
5696# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5697# is blank as the main program is not linked directly against LDLIBRARY.
5698# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5699# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5700# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5701# DLLLIBRARY is the shared (i.e., DLL) library.
5702#
5703# RUNSHARED is used to run shared python without installed libraries
5704#
5705# INSTSONAME is the name of the shared library that will be use to install
5706# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005707#
5708# LDVERSION is the shared library version number, normally the Python version
5709# with the ABI build flags appended.
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
5712
5713
5714
5715
5716
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718LDLIBRARY="$LIBRARY"
5719BLDLIBRARY='$(LDLIBRARY)'
5720INSTSONAME='$(LDLIBRARY)'
5721DLLLIBRARY=''
5722LDLIBRARYDIR=''
5723RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005724LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726# LINKCC is the command that links the python executable -- default is $(CC).
5727# If CXX is set, and if it is needed to link a main function that was
5728# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5729# python might then depend on the C++ runtime
5730# This is altered for AIX in order to build the export list before
5731# linking.
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5734$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735if test -z "$LINKCC"
5736then
5737 LINKCC='$(PURIFY) $(MAINCC)'
5738 case $ac_sys_system in
5739 AIX*)
5740 exp_extra="\"\""
5741 if test $ac_sys_release -ge 5 -o \
5742 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5743 exp_extra="."
5744 fi
5745 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746 QNX*)
5747 # qcc must be used because the other compilers do not
5748 # support -N.
5749 LINKCC=qcc;;
5750 esac
5751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5753$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5756# make sure we default having it set to "no": this is used by
5757# distutils.unixccompiler to know if it should add --enable-new-dtags
5758# to linker command lines, and failing to detect GNU ld simply results
5759# in the same bahaviour as before.
5760
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5762$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763ac_prog=ld
5764if test "$GCC" = yes; then
5765 ac_prog=`$CC -print-prog-name=ld`
5766fi
5767case `"$ac_prog" -V 2>&1 < /dev/null` in
5768 *GNU*)
5769 GNULD=yes;;
5770 *)
5771 GNULD=no;;
5772esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5774$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5777$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005778if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005779 $as_echo_n "(cached) " >&6
5780else
5781 ac_cv_c_inline=no
5782for ac_kw in inline __inline__ __inline; do
5783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5784/* end confdefs.h. */
5785#ifndef __cplusplus
5786typedef int foo_t;
5787static $ac_kw foo_t static_foo () {return 0; }
5788$ac_kw foo_t foo () {return 0; }
5789#endif
5790
5791_ACEOF
5792if ac_fn_c_try_compile "$LINENO"; then :
5793 ac_cv_c_inline=$ac_kw
5794fi
5795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796 test "$ac_cv_c_inline" != no && break
5797done
5798
5799fi
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5801$as_echo "$ac_cv_c_inline" >&6; }
5802
5803case $ac_cv_c_inline in
5804 inline | yes) ;;
5805 *)
5806 case $ac_cv_c_inline in
5807 no) ac_val=;;
5808 *) ac_val=$ac_cv_c_inline;;
5809 esac
5810 cat >>confdefs.h <<_ACEOF
5811#ifndef __cplusplus
5812#define inline $ac_val
5813#endif
5814_ACEOF
5815 ;;
5816esac
5817
5818if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005819
5820$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005821
5822
5823fi
5824
5825
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5827$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005829if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830 enableval=$enable_shared;
5831fi
5832
5833
5834if test -z "$enable_shared"
5835then
5836 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005837 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838 enable_shared="yes";;
5839 *)
5840 enable_shared="no";;
5841 esac
5842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5844$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5847$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005849if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005850 enableval=$enable_profiling;
5851fi
5852
5853if test "x$enable_profiling" = xyes; then
5854 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005855 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857/* end confdefs.h. */
5858int main() { return 0; }
5859_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005860if ac_fn_c_try_link "$LINENO"; then :
5861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005863 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865rm -f core conftest.err conftest.$ac_objext \
5866 conftest$ac_exeext conftest.$ac_ext
5867 CC="$ac_save_cc"
5868else
5869 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5872$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873
doko@ubuntu.comba015832012-06-30 16:52:05 +02005874if test "x$enable_profiling" = xyes; then
5875 BASECFLAGS="-pg $BASECFLAGS"
5876 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
5878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5880$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
5882# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5883# library that we build, but we do not want to link against it (we
5884# will find it with a -framework option). For this reason there is an
5885# extra variable BLDLIBRARY against which Python and the extension
5886# modules are linked, BLDLIBRARY. This is normally the same as
5887# LDLIBRARY, but empty for MacOSX framework builds.
5888if test "$enable_framework"
5889then
5890 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005891 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 BLDLIBRARY=''
5893else
5894 BLDLIBRARY='$(LDLIBRARY)'
5895fi
5896
5897# Other platforms follow
5898if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005899 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
Matthias Kloseb9621712010-04-24 17:59:49 +00005901$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902
5903 case $ac_sys_system in
5904 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).dll.a'
5906 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 ;;
5908 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005909 LDLIBRARY='libpython$(LDVERSION).so'
5910 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005911 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005913 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005914 then
5915 PY3LIBRARY=libpython3.so
5916 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005918 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005919 LDLIBRARY='libpython$(LDVERSION).so'
5920 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005923 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005924 then
5925 PY3LIBRARY=libpython3.so
5926 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
5928 hp*|HP*)
5929 case `uname -m` in
5930 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005938 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).dylib'
5942 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005945 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005947 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005948 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
5950 esac
5951else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005952 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 case $ac_sys_system in
5954 CYGWIN*)
5955 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
5958 esac
5959fi
5960
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005961if test "$cross_compiling" = yes; then
5962 RUNSHARED=
5963fi
5964
Matthias Kloseb9621712010-04-24 17:59:49 +00005965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5966$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967
5968if test -n "$ac_tool_prefix"; then
5969 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5970set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005973if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975else
5976 if test -n "$RANLIB"; then
5977 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5978else
5979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH
5981do
5982 IFS=$as_save_IFS
5983 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005985 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 break 2
5989 fi
5990done
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992IFS=$as_save_IFS
5993
5994fi
5995fi
5996RANLIB=$ac_cv_prog_RANLIB
5997if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5999$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000else
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6002$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003fi
6004
6005
6006fi
6007if test -z "$ac_cv_prog_RANLIB"; then
6008 ac_ct_RANLIB=$RANLIB
6009 # Extract the first word of "ranlib", so it can be a program name with args.
6010set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6012$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006013if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
6016 if test -n "$ac_ct_RANLIB"; then
6017 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6018else
6019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020for as_dir in $PATH
6021do
6022 IFS=$as_save_IFS
6023 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006025 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 break 2
6029 fi
6030done
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032IFS=$as_save_IFS
6033
6034fi
6035fi
6036ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6037if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6039$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040else
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6042$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043fi
6044
6045 if test "x$ac_ct_RANLIB" = x; then
6046 RANLIB=":"
6047 else
6048 case $cross_compiling:$ac_tool_warned in
6049yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052ac_tool_warned=yes ;;
6053esac
6054 RANLIB=$ac_ct_RANLIB
6055 fi
6056else
6057 RANLIB="$ac_cv_prog_RANLIB"
6058fi
6059
6060
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006061if test -n "$ac_tool_prefix"; then
6062 for ac_prog in ar aal
6063 do
6064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006068if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070else
6071 if test -n "$AR"; then
6072 ac_cv_prog_AR="$AR" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006081 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083 break 2
6084 fi
6085done
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087IFS=$as_save_IFS
6088
6089fi
6090fi
6091AR=$ac_cv_prog_AR
6092if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6094$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095else
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098fi
6099
6100
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006101 test -n "$AR" && break
6102 done
6103fi
6104if test -z "$AR"; then
6105 ac_ct_AR=$AR
6106 for ac_prog in ar aal
6107do
6108 # Extract the first word of "$ac_prog", so it can be a program name with args.
6109set dummy $ac_prog; ac_word=$2
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if ${ac_cv_prog_ac_ct_AR+:} false; then :
6113 $as_echo_n "(cached) " >&6
6114else
6115 if test -n "$ac_ct_AR"; then
6116 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006125 ac_cv_prog_ac_ct_AR="$ac_prog"
6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127 break 2
6128 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130 done
6131IFS=$as_save_IFS
6132
6133fi
6134fi
6135ac_ct_AR=$ac_cv_prog_ac_ct_AR
6136if test -n "$ac_ct_AR"; then
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6138$as_echo "$ac_ct_AR" >&6; }
6139else
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145 test -n "$ac_ct_AR" && break
6146done
6147
6148 if test "x$ac_ct_AR" = x; then
6149 AR="ar"
6150 else
6151 case $cross_compiling:$ac_tool_warned in
6152yes:)
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6155ac_tool_warned=yes ;;
6156esac
6157 AR=$ac_ct_AR
6158 fi
6159fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160
6161
6162# tweak ARFLAGS only if the user didn't set it on the command line
6163
6164if test -z "$ARFLAGS"
6165then
6166 ARFLAGS="rc"
6167fi
6168
doko@ubuntu.com58844492012-06-30 18:25:32 +02006169if test -n "$ac_tool_prefix"; then
6170 for ac_prog in readelf
6171 do
6172 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6173set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6175$as_echo_n "checking for $ac_word... " >&6; }
6176if ${ac_cv_prog_READELF+:} false; then :
6177 $as_echo_n "(cached) " >&6
6178else
6179 if test -n "$READELF"; then
6180 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6181else
6182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH
6184do
6185 IFS=$as_save_IFS
6186 test -z "$as_dir" && as_dir=.
6187 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006189 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6191 break 2
6192 fi
6193done
6194 done
6195IFS=$as_save_IFS
6196
6197fi
6198fi
6199READELF=$ac_cv_prog_READELF
6200if test -n "$READELF"; then
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6202$as_echo "$READELF" >&6; }
6203else
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205$as_echo "no" >&6; }
6206fi
6207
6208
6209 test -n "$READELF" && break
6210 done
6211fi
6212if test -z "$READELF"; then
6213 ac_ct_READELF=$READELF
6214 for ac_prog in readelf
6215do
6216 # Extract the first word of "$ac_prog", so it can be a program name with args.
6217set dummy $ac_prog; ac_word=$2
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6219$as_echo_n "checking for $ac_word... " >&6; }
6220if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6221 $as_echo_n "(cached) " >&6
6222else
6223 if test -n "$ac_ct_READELF"; then
6224 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6225else
6226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227for as_dir in $PATH
6228do
6229 IFS=$as_save_IFS
6230 test -z "$as_dir" && as_dir=.
6231 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006232 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006233 ac_cv_prog_ac_ct_READELF="$ac_prog"
6234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6235 break 2
6236 fi
6237done
6238 done
6239IFS=$as_save_IFS
6240
6241fi
6242fi
6243ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6244if test -n "$ac_ct_READELF"; then
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6246$as_echo "$ac_ct_READELF" >&6; }
6247else
6248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6249$as_echo "no" >&6; }
6250fi
6251
6252
6253 test -n "$ac_ct_READELF" && break
6254done
6255
6256 if test "x$ac_ct_READELF" = x; then
6257 READELF=":"
6258 else
6259 case $cross_compiling:$ac_tool_warned in
6260yes:)
6261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6263ac_tool_warned=yes ;;
6264esac
6265 READELF=$ac_ct_READELF
6266 fi
6267fi
6268
6269if test "$cross_compiling" = yes; then
6270 case "$READELF" in
6271 readelf|:)
6272 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6273 ;;
6274 esac
6275fi
6276
6277
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279case $MACHDEP in
6280bsdos*|hp*|HP*)
6281 # install -d does not work on BSDI or HP-UX
6282 if test -z "$INSTALL"
6283 then
6284 INSTALL="${srcdir}/install-sh -c"
6285 fi
6286esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287# Find a good install program. We prefer a C program (faster),
6288# so one script is as good as another. But avoid the broken or
6289# incompatible versions:
6290# SysV /etc/install, /usr/sbin/install
6291# SunOS /usr/etc/install
6292# IRIX /sbin/install
6293# AIX /bin/install
6294# AmigaOS /C/install, which installs bootblocks on floppy discs
6295# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6296# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6297# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6298# OS/2's system install, which has a completely different semantic
6299# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006300# Reject install programs that cannot install multiple files.
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6302$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006304if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006305 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306else
6307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308for as_dir in $PATH
6309do
6310 IFS=$as_save_IFS
6311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006312 # Account for people who put trailing slashes in PATH elements.
6313case $as_dir/ in #((
6314 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 /usr/ucb/* ) ;;
6318 *)
6319 # OSF1 and SCO ODT 3.0 have their own names for install.
6320 # Don't use installbsd from OSF since it installs stuff as root
6321 # by default.
6322 for ac_prog in ginstall scoinst install; do
6323 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006324 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 if test $ac_prog = install &&
6326 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6327 # AIX install. It has an incompatible calling convention.
6328 :
6329 elif test $ac_prog = install &&
6330 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6331 # program-specific install script used by HP pwplus--don't use.
6332 :
6333 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 rm -rf conftest.one conftest.two conftest.dir
6335 echo one > conftest.one
6336 echo two > conftest.two
6337 mkdir conftest.dir
6338 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6339 test -s conftest.one && test -s conftest.two &&
6340 test -s conftest.dir/conftest.one &&
6341 test -s conftest.dir/conftest.two
6342 then
6343 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6344 break 3
6345 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346 fi
6347 fi
6348 done
6349 done
6350 ;;
6351esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006352
6353 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006354IFS=$as_save_IFS
6355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357
6358fi
6359 if test "${ac_cv_path_install+set}" = set; then
6360 INSTALL=$ac_cv_path_install
6361 else
6362 # As a last resort, use the slow shell script. Don't cache a
6363 # value for INSTALL within a source directory, because that will
6364 # break other packages using the cache if that directory is
6365 # removed, or if the value is a relative name.
6366 INSTALL=$ac_install_sh
6367 fi
6368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6370$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
6372# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6373# It thinks the first close brace ends the variable substitution.
6374test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6375
6376test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6377
6378test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6379
Matthias Klose93a0ef12012-03-15 18:08:34 +01006380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6381$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6382if test -z "$MKDIR_P"; then
6383 if ${ac_cv_path_mkdir+:} false; then :
6384 $as_echo_n "(cached) " >&6
6385else
6386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6388do
6389 IFS=$as_save_IFS
6390 test -z "$as_dir" && as_dir=.
6391 for ac_prog in mkdir gmkdir; do
6392 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006393 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006394 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6395 'mkdir (GNU coreutils) '* | \
6396 'mkdir (coreutils) '* | \
6397 'mkdir (fileutils) '4.1*)
6398 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6399 break 3;;
6400 esac
6401 done
6402 done
6403 done
6404IFS=$as_save_IFS
6405
6406fi
6407
6408 test -d ./--version && rmdir ./--version
6409 if test "${ac_cv_path_mkdir+set}" = set; then
6410 MKDIR_P="$ac_cv_path_mkdir -p"
6411 else
6412 # As a last resort, use the slow shell script. Don't cache a
6413 # value for MKDIR_P within a source directory, because that will
6414 # break other packages using the cache if that directory is
6415 # removed, or if the value is a relative name.
6416 MKDIR_P="$ac_install_sh -d"
6417 fi
6418fi
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6420$as_echo "$MKDIR_P" >&6; }
6421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422
6423# Not every filesystem supports hard links
6424
6425if test -z "$LN" ; then
6426 case $ac_sys_system in
6427 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 *) LN=ln;;
6429 esac
6430fi
6431
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006432# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006433
6434ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6438$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006439
6440# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006441if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442 withval=$with_pydebug;
6443if test "$withval" != no
6444then
6445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447
Matthias Kloseb9621712010-04-24 17:59:49 +00006448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6449$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006451 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006452else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454fi
6455else
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458fi
6459
6460
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006461# Enable LTO flags
6462
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6464$as_echo_n "checking for --with-lto... " >&6; }
6465
6466# Check whether --with-lto was given.
6467if test "${with_lto+set}" = set; then :
6468 withval=$with_lto;
6469if test "$withval" != no
6470then
6471 Py_LTO='true'
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6473$as_echo "yes" >&6; };
6474else
6475 Py_LTO='false'
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477$as_echo "no" >&6; };
6478fi
6479else
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; }
6482fi
6483
6484if test "$Py_LTO" = 'true' ; then
6485 case $CC in
6486 *clang*)
6487 # Any changes made here should be reflected in the GCC+Darwin case below
6488 LTOFLAGS="-flto"
6489 ;;
6490 *gcc*)
6491 case $ac_sys_system in
6492 Darwin*)
6493 LTOFLAGS="-flto"
6494 ;;
6495 *)
6496 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6497 ;;
6498 esac
6499 ;;
6500 esac
6501fi
6502
Brett Cannon7188a3e2015-09-18 15:13:44 -07006503# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006504
6505
6506
6507
6508
6509
Brett Cannon7188a3e2015-09-18 15:13:44 -07006510# Extract the first word of "llvm-profdata", so it can be a program name with args.
6511set dummy llvm-profdata; ac_word=$2
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6513$as_echo_n "checking for $ac_word... " >&6; }
6514if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6515 $as_echo_n "(cached) " >&6
6516else
6517 if test -n "$LLVM_PROF_FOUND"; then
6518 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6519else
6520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6521for as_dir in $PATH
6522do
6523 IFS=$as_save_IFS
6524 test -z "$as_dir" && as_dir=.
6525 for ac_exec_ext in '' $ac_executable_extensions; do
6526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6527 ac_cv_prog_LLVM_PROF_FOUND="found"
6528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6529 break 2
6530 fi
6531done
6532 done
6533IFS=$as_save_IFS
6534
6535 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6536fi
6537fi
6538LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6539if test -n "$LLVM_PROF_FOUND"; then
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6541$as_echo "$LLVM_PROF_FOUND" >&6; }
6542else
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544$as_echo "no" >&6; }
6545fi
6546
6547
6548LLVM_PROF_ERR=no
6549case $CC in
6550 *clang*)
6551 # Any changes made here should be reflected in the GCC+Darwin case below
6552 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6553 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6554 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6555 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6556 if test $LLVM_PROF_FOUND = not-found
6557 then
6558 LLVM_PROF_ERR=yes
6559 fi
6560 ;;
6561 *gcc*)
6562 case $ac_sys_system in
6563 Darwin*)
6564 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6565 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6566 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6567 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6568 if test $LLVM_PROF_FOUND = not-found
6569 then
6570 LLVM_PROF_ERR=yes
6571 fi
6572 ;;
6573 *)
6574 PGO_PROF_GEN_FLAG="-fprofile-generate"
6575 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6576 LLVM_PROF_MERGER="true"
6577 LLVM_PROF_FILE=""
6578 ;;
6579 esac
6580 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006581 *icc*)
6582 PGO_PROF_GEN_FLAG="-prof-gen"
6583 PGO_PROF_USE_FLAG="-prof-use"
6584 LLVM_PROF_MERGER="true"
6585 LLVM_PROF_FILE=""
6586 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006587esac
6588
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006589# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6590# merged with this chunk of code?
6591
6592# Optimizer/debugger flags
6593# ------------------------
6594# (The following bit of code is complicated enough - please keep things
6595# indented properly. Just pretend you're editing Python code. ;-)
6596
6597# There are two parallel sets of case statements below, one that checks to
6598# see if OPT was set and one that does BASECFLAGS setting based upon
6599# compiler and platform. BASECFLAGS tweaks need to be made even if the
6600# user set OPT.
6601
6602# tweak OPT based on compiler and platform, only if the user didn't set
6603# it on the command line
6604
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006605if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606then
6607 case $GCC in
6608 yes)
6609 if test "$CC" != 'g++' ; then
6610 STRICT_PROTO="-Wstrict-prototypes"
6611 fi
6612 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6613 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6614 WRAP="-fwrapv"
6615 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006616
6617 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006618 case $CC in
6619 *clang*) WRAP="-fwrapv"
6620 ;;
6621 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623 case $ac_cv_prog_cc_g in
6624 yes)
6625 if test "$Py_DEBUG" = 'true' ; then
6626 # Optimization messes up debuggers, so turn it off for
6627 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006628 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6629 OPT="-g -Og -Wall $STRICT_PROTO"
6630 else
6631 OPT="-g -O0 -Wall $STRICT_PROTO"
6632 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006633 else
6634 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6635 fi
6636 ;;
6637 *)
6638 OPT="-O3 -Wall $STRICT_PROTO"
6639 ;;
6640 esac
6641 case $ac_sys_system in
6642 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6643 ;;
6644 esac
6645 ;;
6646
6647 *)
6648 OPT="-O"
6649 ;;
6650 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651fi
6652
6653
6654
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006655
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006656# The -arch flags for universal builds on OSX
6657UNIVERSAL_ARCH_FLAGS=
6658
6659
6660# tweak BASECFLAGS based on compiler and platform
6661case $GCC in
6662yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006663 # Python doesn't violate C99 aliasing rules, but older versions of
6664 # GCC produce warnings for legal Python code. Enable
6665 # -fno-strict-aliasing on versions of GCC that support but produce
6666 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6668$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669 ac_save_cc="$CC"
6670 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006671 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006672 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006674else
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006677
Matthias Kloseb159a552010-04-25 21:00:44 +00006678
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006679int
6680main ()
6681{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006682
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006683 ;
6684 return 0;
6685}
Matthias Kloseb159a552010-04-25 21:00:44 +00006686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006688if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006689
6690 CC="$ac_save_cc -fstrict-aliasing"
6691 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006693/* end confdefs.h. */
6694
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006695 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006696int
6697main ()
6698{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006699double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006700 ;
6701 return 0;
6702}
Matthias Kloseb159a552010-04-25 21:00:44 +00006703
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006705if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006706
6707 ac_cv_no_strict_aliasing=no
6708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709else
Matthias Kloseb159a552010-04-25 21:00:44 +00006710
6711 ac_cv_no_strict_aliasing=yes
6712
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006713fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006715
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006716else
Matthias Kloseb159a552010-04-25 21:00:44 +00006717
6718 ac_cv_no_strict_aliasing=no
6719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006722fi
6723
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006724 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006725 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6727$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006728 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729 then
6730 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6731 fi
6732
Zachary Ware5af85642015-12-21 12:09:17 -06006733 # ICC doesn't recognize the option, but only emits a warning
6734 ## XXX does it emit an unused result warning and can it be disabled?
6735 case "$CC" in
6736 *icc*)
6737 ac_cv_disable_unused_result_warning=no
6738 ;;
6739 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6741$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6742 ac_save_cc="$CC"
6743 CC="$CC -Wunused-result -Werror"
6744 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006745 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006746 $as_echo_n "(cached) " >&6
6747else
6748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6749/* end confdefs.h. */
6750
6751
6752int
6753main ()
6754{
6755
6756 ;
6757 return 0;
6758}
6759
6760_ACEOF
6761if ac_fn_c_try_compile "$LINENO"; then :
6762
6763 ac_cv_disable_unused_result_warning=yes
6764
6765else
6766
6767 ac_cv_disable_unused_result_warning=no
6768
6769fi
6770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6771fi
6772
6773 CFLAGS="$save_CFLAGS"
6774 CC="$ac_save_cc"
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6776$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006777 ;;
6778 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006779
6780 if test $ac_cv_disable_unused_result_warning = yes
6781 then
6782 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6783 fi
6784
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6786$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6787 ac_save_cc="$CC"
6788 CC="$CC -Werror=declaration-after-statement"
6789 save_CFLAGS="$CFLAGS"
6790 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6791 $as_echo_n "(cached) " >&6
6792else
6793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6794/* end confdefs.h. */
6795
6796
6797int
6798main ()
6799{
6800
6801 ;
6802 return 0;
6803}
6804
6805_ACEOF
6806if ac_fn_c_try_compile "$LINENO"; then :
6807
6808 ac_cv_declaration_after_statement_warning=yes
6809
6810else
6811
6812 ac_cv_declaration_after_statement_warning=no
6813
6814fi
6815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6816fi
6817
6818 CFLAGS="$save_CFLAGS"
6819 CC="$ac_save_cc"
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6821$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6822
6823 if test $ac_cv_declaration_after_statement_warning = yes
6824 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006825 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006826 fi
6827
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6829$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6830 ac_save_cc="$CC"
6831 CC="$CC -Wsign-compare"
6832 save_CFLAGS="$CFLAGS"
6833 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6834 $as_echo_n "(cached) " >&6
6835else
6836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6837/* end confdefs.h. */
6838
6839
6840int
6841main ()
6842{
6843
6844 ;
6845 return 0;
6846}
6847
6848_ACEOF
6849if ac_fn_c_try_compile "$LINENO"; then :
6850
6851 ac_cv_enable_sign_compare_warning=yes
6852
6853else
6854
6855 ac_cv_enable_sign_compare_warning=no
6856
6857fi
6858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6859fi
6860
6861 CFLAGS="$save_CFLAGS"
6862 CC="$ac_save_cc"
6863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6864$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6865
6866 if test $ac_cv_enable_sign_compare_warning = yes
6867 then
6868 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6869 fi
6870
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6872$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6873 ac_save_cc="$CC"
6874 CC="$CC -Wunreachable-code"
6875 save_CFLAGS="$CFLAGS"
6876 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6877 $as_echo_n "(cached) " >&6
6878else
6879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6880/* end confdefs.h. */
6881
6882
6883int
6884main ()
6885{
6886
6887 ;
6888 return 0;
6889}
6890
6891_ACEOF
6892if ac_fn_c_try_compile "$LINENO"; then :
6893
6894 ac_cv_enable_unreachable_code_warning=yes
6895
6896else
6897
6898 ac_cv_enable_unreachable_code_warning=no
6899
6900fi
6901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6902fi
6903
6904 CFLAGS="$save_CFLAGS"
6905 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006906
6907 # Don't enable unreachable code warning in debug mode, since it usually
6908 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006909 # Issue #24324: Unfortunately, the unreachable code warning does not work
6910 # correctly on gcc and has been silently removed from the compiler.
6911 # It is supported on clang but on OS X systems gcc may be an alias
6912 # for clang. Try to determine if the compiler is not really gcc and,
6913 # if so, only then enable the warning.
6914 if test $ac_cv_enable_unreachable_code_warning = yes && \
6915 test "$Py_DEBUG" != "true" && \
6916 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006917 then
6918 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006919 else
6920 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006921 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6923$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006924
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6926 # support. Without this, treatment of subnormals doesn't follow
6927 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006928 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929 alpha*)
6930 BASECFLAGS="$BASECFLAGS -mieee"
6931 ;;
6932 esac
6933
6934 case $ac_sys_system in
6935 SCO_SV*)
6936 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6937 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006938
6939 # is there any other compiler on Darwin besides gcc?
6940 Darwin*)
6941 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6942 # used to be here, but non-Apple gcc doesn't accept them.
6943 if test "${CC}" = gcc
6944 then
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006946$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006947 case "${UNIVERSALSDK}" in
6948 */MacOSX10.4u.sdk)
6949 # Build using 10.4 SDK, force usage of gcc when the
6950 # compiler is gcc, otherwise the user will get very
6951 # confusing error messages when building on OSX 10.6
6952 CC=gcc-4.0
6953 CPP=cpp-4.0
6954 ;;
6955 esac
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006957$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006958 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959
Ned Deily87adb6e2013-10-18 21:09:56 -07006960 if test "${enable_universalsdk}"
6961 then
6962 case "$UNIVERSAL_ARCHS" in
6963 32-bit)
6964 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6965 LIPO_32BIT_FLAGS=""
6966 ARCH_RUN_32BIT=""
6967 ;;
6968 64-bit)
6969 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6970 LIPO_32BIT_FLAGS=""
6971 ARCH_RUN_32BIT="true"
6972 ;;
6973 all)
6974 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6975 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6976 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6977 ;;
6978 intel)
6979 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6980 LIPO_32BIT_FLAGS="-extract i386"
6981 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6982 ;;
6983 intel-32)
6984 UNIVERSAL_ARCH_FLAGS="-arch i386"
6985 LIPO_32BIT_FLAGS=""
6986 ARCH_RUN_32BIT=""
6987 ;;
6988 3-way)
6989 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6990 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6991 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6992 ;;
6993 *)
6994 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6995 ;;
6996 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997
Ned Deily87adb6e2013-10-18 21:09:56 -07006998 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6999 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7000 if test "${UNIVERSALSDK}" != "/"
7001 then
7002 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7003 fi
7004 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005
Ned Deily87adb6e2013-10-18 21:09:56 -07007006 # Calculate an appropriate deployment target for this build:
7007 # The deployment target value is used explicitly to enable certain
7008 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007009 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007010 # component of the string returned by distutils.get_platform().
7011 #
7012 # Use the value from:
7013 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7014 # 2. the operating system version of the build machine if >= 10.6
7015 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7016 # below to pick either 10.3, 10.4, or 10.5 as the target.
7017 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018
Ned Deily87adb6e2013-10-18 21:09:56 -07007019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7020$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007021 cur_target_major=`sw_vers -productVersion | \
7022 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7023 cur_target_minor=`sw_vers -productVersion | \
7024 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7025 cur_target="${cur_target_major}.${cur_target_minor}"
7026 if test ${cur_target_major} -eq 10 && \
7027 test ${cur_target_minor} -ge 3 && \
7028 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007029 then
Ned Deily36820b62014-06-25 13:44:22 -07007030 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007031 cur_target=10.3
7032 if test ${enable_universalsdk}
7033 then
7034 case "$UNIVERSAL_ARCHS" in
7035 all|3-way|intel|64-bit)
7036 # These configurations were first supported in 10.5
7037 cur_target='10.5'
7038 ;;
7039 esac
7040 else
7041 if test `/usr/bin/arch` = "i386"
7042 then
7043 # 10.4 was the first release to support Intel archs
7044 cur_target="10.4"
7045 fi
7046 fi
7047 fi
7048 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007049
Ned Deily87adb6e2013-10-18 21:09:56 -07007050 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7051 # environment with a value that is the same as what we'll use
7052 # in the Makefile to ensure that we'll get the same compiler
7053 # environment during configure and build time.
7054 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7055 export MACOSX_DEPLOYMENT_TARGET
7056 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7058$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007059
Ned Deily87adb6e2013-10-18 21:09:56 -07007060 # end of Darwin* tests
7061 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007062 esac
7063 ;;
7064
7065*)
7066 case $ac_sys_system in
7067 OpenUNIX*|UnixWare*)
7068 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7069 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007070 SCO_SV*)
7071 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7072 ;;
7073 esac
7074 ;;
7075esac
7076
Zachary Ware5af85642015-12-21 12:09:17 -06007077# ICC needs -fp-model strict or floats behave badly
7078case "$CC" in
7079*icc*)
7080 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7081 ;;
7082esac
7083
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007084if test "$Py_DEBUG" = 'true'; then
7085 :
7086else
7087 OPT="-DNDEBUG $OPT"
7088fi
7089
7090if test "$ac_arch_flags"
7091then
7092 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7093fi
7094
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007095# On some compilers, pthreads are available without further options
7096# (e.g. MacOS X). On some of these systems, the compiler will not
7097# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7098# So we have to see first whether pthreads are available without
7099# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7101$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007102if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007106 ac_cv_pthread_is_default=no
7107else
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007109/* end confdefs.h. */
7110
Stefan Krah7dba5942012-11-22 22:49:11 +01007111#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007112#include <pthread.h>
7113
7114void* routine(void* p){return NULL;}
7115
7116int main(){
7117 pthread_t p;
7118 if(pthread_create(&p,NULL,routine,NULL)!=0)
7119 return 1;
7120 (void)pthread_detach(p);
7121 return 0;
7122}
7123
7124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007125if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007126
7127 ac_cv_pthread_is_default=yes
7128 ac_cv_kthread=no
7129 ac_cv_pthread=no
7130
7131else
Matthias Kloseb9621712010-04-24 17:59:49 +00007132 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7135 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007136fi
7137
7138
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007139fi
7140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7142$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007143
7144
7145if test $ac_cv_pthread_is_default = yes
7146then
7147 ac_cv_kpthread=no
7148else
7149# -Kpthread, if available, provides the right #defines
7150# and linker options to make pthread_create available
7151# Some compilers won't report that they do not support -Kpthread,
7152# so we need to run a program to see whether it really made the
7153# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7155$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007156if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007158else
7159 ac_save_cc="$CC"
7160CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007161if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007162 ac_cv_kpthread=no
7163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007165/* end confdefs.h. */
7166
Stefan Krah7dba5942012-11-22 22:49:11 +01007167#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007168#include <pthread.h>
7169
7170void* routine(void* p){return NULL;}
7171
7172int main(){
7173 pthread_t p;
7174 if(pthread_create(&p,NULL,routine,NULL)!=0)
7175 return 1;
7176 (void)pthread_detach(p);
7177 return 0;
7178}
7179
7180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007181if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007182 ac_cv_kpthread=yes
7183else
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188fi
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190CC="$ac_save_cc"
7191fi
7192
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7194$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007195fi
7196
7197if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7198then
7199# -Kthread, if available, provides the right #defines
7200# and linker options to make pthread_create available
7201# Some compilers won't report that they do not support -Kthread,
7202# so we need to run a program to see whether it really made the
7203# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7205$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007206if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007207 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007208else
7209 ac_save_cc="$CC"
7210CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007211if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007212 ac_cv_kthread=no
7213else
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215/* end confdefs.h. */
7216
Stefan Krah7dba5942012-11-22 22:49:11 +01007217#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218#include <pthread.h>
7219
7220void* routine(void* p){return NULL;}
7221
7222int main(){
7223 pthread_t p;
7224 if(pthread_create(&p,NULL,routine,NULL)!=0)
7225 return 1;
7226 (void)pthread_detach(p);
7227 return 0;
7228}
7229
7230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232 ac_cv_kthread=yes
7233else
Matthias Kloseb9621712010-04-24 17:59:49 +00007234 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007238fi
7239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240CC="$ac_save_cc"
7241fi
7242
Matthias Kloseb9621712010-04-24 17:59:49 +00007243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7244$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245fi
7246
7247if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7248then
7249# -pthread, if available, provides the right #defines
7250# and linker options to make pthread_create available
7251# Some compilers won't report that they do not support -pthread,
7252# so we need to run a program to see whether it really made the
7253# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7255$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007256if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258else
7259 ac_save_cc="$CC"
7260CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007261if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262 ac_cv_pthread=no
7263else
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265/* end confdefs.h. */
7266
Stefan Krah7dba5942012-11-22 22:49:11 +01007267#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007268#include <pthread.h>
7269
7270void* routine(void* p){return NULL;}
7271
7272int main(){
7273 pthread_t p;
7274 if(pthread_create(&p,NULL,routine,NULL)!=0)
7275 return 1;
7276 (void)pthread_detach(p);
7277 return 0;
7278}
7279
7280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007281if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007282 ac_cv_pthread=yes
7283else
Matthias Kloseb9621712010-04-24 17:59:49 +00007284 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7287 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288fi
7289
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290CC="$ac_save_cc"
7291fi
7292
Matthias Kloseb9621712010-04-24 17:59:49 +00007293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7294$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295fi
7296
7297# If we have set a CC compiler flag for thread support then
7298# check if it works for CXX, too.
7299ac_cv_cxx_thread=no
7300if test ! -z "$CXX"
7301then
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7303$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007304ac_save_cxx="$CXX"
7305
7306if test "$ac_cv_kpthread" = "yes"
7307then
7308 CXX="$CXX -Kpthread"
7309 ac_cv_cxx_thread=yes
7310elif test "$ac_cv_kthread" = "yes"
7311then
7312 CXX="$CXX -Kthread"
7313 ac_cv_cxx_thread=yes
7314elif test "$ac_cv_pthread" = "yes"
7315then
7316 CXX="$CXX -pthread"
7317 ac_cv_cxx_thread=yes
7318fi
7319
7320if test $ac_cv_cxx_thread = yes
7321then
7322 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7323 $CXX -c conftest.$ac_ext 2>&5
7324 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7325 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7326 then
7327 ac_cv_cxx_thread=yes
7328 else
7329 ac_cv_cxx_thread=no
7330 fi
7331 rm -fr conftest*
7332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7334$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335fi
7336CXX="$ac_save_cxx"
7337
7338
7339# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7341$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007342if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007343 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344else
Matthias Kloseb9621712010-04-24 17:59:49 +00007345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346/* end confdefs.h. */
7347#include <stdlib.h>
7348#include <stdarg.h>
7349#include <string.h>
7350#include <float.h>
7351
7352int
7353main ()
7354{
7355
7356 ;
7357 return 0;
7358}
7359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007360if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361 ac_cv_header_stdc=yes
7362else
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7366
7367if test $ac_cv_header_stdc = yes; then
7368 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370/* end confdefs.h. */
7371#include <string.h>
7372
7373_ACEOF
7374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 $EGREP "memchr" >/dev/null 2>&1; then :
7376
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377else
7378 ac_cv_header_stdc=no
7379fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007380rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381
7382fi
7383
7384if test $ac_cv_header_stdc = yes; then
7385 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387/* end confdefs.h. */
7388#include <stdlib.h>
7389
7390_ACEOF
7391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 $EGREP "free" >/dev/null 2>&1; then :
7393
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394else
7395 ac_cv_header_stdc=no
7396fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007397rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398
7399fi
7400
7401if test $ac_cv_header_stdc = yes; then
7402 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404 :
7405else
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407/* end confdefs.h. */
7408#include <ctype.h>
7409#include <stdlib.h>
7410#if ((' ' & 0x0FF) == 0x020)
7411# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7412# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7413#else
7414# define ISLOWER(c) \
7415 (('a' <= (c) && (c) <= 'i') \
7416 || ('j' <= (c) && (c) <= 'r') \
7417 || ('s' <= (c) && (c) <= 'z'))
7418# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7419#endif
7420
7421#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7422int
7423main ()
7424{
7425 int i;
7426 for (i = 0; i < 256; i++)
7427 if (XOR (islower (i), ISLOWER (i))
7428 || toupper (i) != TOUPPER (i))
7429 return 2;
7430 return 0;
7431}
7432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007433if ac_fn_c_try_run "$LINENO"; then :
7434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435else
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7439 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440fi
7441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442fi
7443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7445$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446if test $ac_cv_header_stdc = yes; then
7447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449
7450fi
7451
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007452for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007453fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007454ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007455sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007456unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007457poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007458sys/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 +01007459sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007460sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007461sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007462sys/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 -07007463libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007464bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007465sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007466do :
7467 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7468ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007469if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007470 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007471#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007472_ACEOF
7473
7474fi
7475
Guido van Rossum627b2d71993-12-24 10:39:16 +00007476done
7477
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007478ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007479for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7482$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007483if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007485else
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007487/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007488#include <sys/types.h>
7489#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007490
Martin v. Löwis11437992002-04-12 09:54:03 +00007491int
7492main ()
7493{
7494if ((DIR *) 0)
7495return 0;
7496 ;
7497 return 0;
7498}
7499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007501 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007502else
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007507eval ac_res=\$$as_ac_Header
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7509$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007510if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007511 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007512#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007513_ACEOF
7514
7515ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007516fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007517
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518done
7519# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7520if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7522$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007523if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007525else
Martin v. Löwis11437992002-04-12 09:54:03 +00007526 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530/* Override any GCC internal prototype to avoid an error.
7531 Use char because int might match the return type of a GCC
7532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007533#ifdef __cplusplus
7534extern "C"
7535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007536char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007537int
7538main ()
7539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007540return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007541 ;
7542 return 0;
7543}
7544_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007545for ac_lib in '' dir; do
7546 if test -z "$ac_lib"; then
7547 ac_res="none required"
7548 else
7549 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007550 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007551 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007553 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007555rm -f core conftest.err conftest.$ac_objext \
7556 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007557 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007558 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560done
Victor Stinnere0be4232011-10-25 13:06:09 +02007561if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007563else
7564 ac_cv_search_opendir=no
7565fi
7566rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007567LIBS=$ac_func_search_save_LIBS
7568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7570$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007571ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007573 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007574
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007575fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007576
Michael W. Hudson54241132001-12-07 15:38:26 +00007577else
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7579$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007580if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007581 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007582else
7583 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007587/* Override any GCC internal prototype to avoid an error.
7588 Use char because int might match the return type of a GCC
7589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007590#ifdef __cplusplus
7591extern "C"
7592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007593char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007594int
7595main ()
7596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 ;
7599 return 0;
7600}
7601_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602for ac_lib in '' x; do
7603 if test -z "$ac_lib"; then
7604 ac_res="none required"
7605 else
7606 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007607 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007612rm -f core conftest.err conftest.$ac_objext \
7613 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007614 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617done
Victor Stinnere0be4232011-10-25 13:06:09 +02007618if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620else
7621 ac_cv_search_opendir=no
7622fi
7623rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007624LIBS=$ac_func_search_save_LIBS
7625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7627$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007629if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007631
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007632fi
7633
7634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7637$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007638if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007640else
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007642/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007643#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007644int
7645main ()
7646{
7647return makedev(0, 0);
7648 ;
7649 return 0;
7650}
7651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007652if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007653 ac_cv_header_sys_types_h_makedev=yes
7654else
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007657rm -f core conftest.err conftest.$ac_objext \
7658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007659
7660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7662$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007663
7664if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007665ac_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 +02007666if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007669
7670fi
7671
7672
7673
7674 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 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 +02007676if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007677
Matthias Kloseb9621712010-04-24 17:59:49 +00007678$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007679
7680fi
7681
7682
7683 fi
7684fi
7685
Michael W. Hudson54241132001-12-07 15:38:26 +00007686
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007687# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7688for ac_header in net/if.h
7689do :
7690 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7691#ifdef STDC_HEADERS
7692# include <stdlib.h>
7693# include <stddef.h>
7694#else
7695# ifdef HAVE_STDLIB_H
7696# include <stdlib.h>
7697# endif
7698#endif
7699#ifdef HAVE_SYS_SOCKET_H
7700# include <sys/socket.h>
7701#endif
7702
7703"
Victor Stinnere0be4232011-10-25 13:06:09 +02007704if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007705 cat >>confdefs.h <<_ACEOF
7706#define HAVE_NET_IF_H 1
7707_ACEOF
7708
7709fi
7710
7711done
7712
7713
Martin v. Löwis11017b12006-01-14 18:12:57 +00007714# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007715for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007716do :
7717 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 +00007718#ifdef HAVE_ASM_TYPES_H
7719#include <asm/types.h>
7720#endif
7721#ifdef HAVE_SYS_SOCKET_H
7722#include <sys/socket.h>
7723#endif
7724
Matthias Kloseb9621712010-04-24 17:59:49 +00007725"
Victor Stinnere0be4232011-10-25 13:06:09 +02007726if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007727 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007728#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007729_ACEOF
7730
7731fi
7732
7733done
7734
7735
Charles-François Natali47413c12011-10-06 19:47:44 +02007736# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007737for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007738do :
7739 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7740ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7741#ifdef HAVE_SYS_SOCKET_H
7742#include <sys/socket.h>
7743#endif
7744
7745"
7746if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7747 cat >>confdefs.h <<_ACEOF
7748#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7749_ACEOF
7750
7751fi
7752
7753done
7754
7755
Guido van Rossum627b2d71993-12-24 10:39:16 +00007756# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007757was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7759$as_echo_n "checking for clock_t in time.h... " >&6; }
7760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007761/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007763
7764_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007766 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007767 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007768else
Martin v. Löwis11437992002-04-12 09:54:03 +00007769
7770
Matthias Kloseb9621712010-04-24 17:59:49 +00007771$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007772
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007773
Guido van Rossum627b2d71993-12-24 10:39:16 +00007774fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007775rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007776
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7778$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007779
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7781$as_echo_n "checking for makedev... " >&6; }
7782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007783/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007784
Jesus Cea740f53a2010-04-28 11:35:30 +00007785#if defined(MAJOR_IN_MKDEV)
7786#include <sys/mkdev.h>
7787#elif defined(MAJOR_IN_SYSMACROS)
7788#include <sys/sysmacros.h>
7789#else
7790#include <sys/types.h>
7791#endif
7792
Neal Norwitz11690112002-07-30 01:08:28 +00007793int
7794main ()
7795{
Jesus Cea740f53a2010-04-28 11:35:30 +00007796
7797 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007798 ;
7799 return 0;
7800}
Matthias Kloseb159a552010-04-25 21:00:44 +00007801
Neal Norwitz11690112002-07-30 01:08:28 +00007802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007803if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007804 ac_cv_has_makedev=yes
7805else
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007808rm -f core conftest.err conftest.$ac_objext \
7809 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7811$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007812if test "$ac_cv_has_makedev" = "yes"; then
7813
Matthias Kloseb9621712010-04-24 17:59:49 +00007814$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007815
7816fi
7817
Christian Heimes985ecdc2013-11-20 11:46:18 +01007818# byte swapping
7819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7820$as_echo_n "checking for le64toh... " >&6; }
7821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7822/* end confdefs.h. */
7823
7824#ifdef HAVE_ENDIAN_H
7825#include <endian.h>
7826#elif defined(HAVE_SYS_ENDIAN_H)
7827#include <sys/endian.h>
7828#endif
7829
7830int
7831main ()
7832{
7833
7834 le64toh(1)
7835 ;
7836 return 0;
7837}
7838
7839_ACEOF
7840if ac_fn_c_try_link "$LINENO"; then :
7841 ac_cv_has_le64toh=yes
7842else
7843 ac_cv_has_le64toh=no
7844fi
7845rm -f core conftest.err conftest.$ac_objext \
7846 conftest$ac_exeext conftest.$ac_ext
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7848$as_echo "$ac_cv_has_le64toh" >&6; }
7849if test "$ac_cv_has_le64toh" = "yes"; then
7850
7851$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7852
7853fi
7854
Martin v. Löwis399a6892002-10-04 10:22:02 +00007855# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7856# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7857# defined, but the compiler does not support pragma redefine_extname,
7858# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7859# structures (such as rlimit64) without declaring them. As a
7860# work-around, disable LFS on such configurations
7861
7862use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7864$as_echo_n "checking Solaris LFS bug... " >&6; }
7865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007866/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007867
7868#define _LARGEFILE_SOURCE 1
7869#define _FILE_OFFSET_BITS 64
7870#include <sys/resource.h>
7871
Martin v. Löwis399a6892002-10-04 10:22:02 +00007872int
7873main ()
7874{
7875struct rlimit foo;
7876 ;
7877 return 0;
7878}
7879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007881 sol_lfs_bug=no
7882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7887$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007888if test "$sol_lfs_bug" = "yes"; then
7889 use_lfs=no
7890fi
7891
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007892# Don't use largefile support for GNU/Hurd
7893case $ac_sys_system in GNU*)
7894 use_lfs=no
7895esac
7896
Martin v. Löwis399a6892002-10-04 10:22:02 +00007897if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007898# Two defines needed to enable largefile support on various platforms
7899# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007900case $ac_sys_system/$ac_sys_release in
7901AIX*)
7902
7903$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7904
7905 ;;
7906esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007909
7910
Matthias Kloseb9621712010-04-24 17:59:49 +00007911$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007912
Martin v. Löwis399a6892002-10-04 10:22:02 +00007913fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007914
Guido van Rossum84e7b241996-08-19 21:59:00 +00007915# Add some code to confdefs.h so that the test for off_t works on SCO
7916cat >> confdefs.h <<\EOF
7917#if defined(SCO_DS)
7918#undef _OFF_T
7919#endif
7920EOF
7921
Guido van Rossumef2255b2000-03-10 22:30:29 +00007922# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007923ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007924if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007925
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007926else
Martin v. Löwis11437992002-04-12 09:54:03 +00007927
7928cat >>confdefs.h <<_ACEOF
7929#define mode_t int
7930_ACEOF
7931
7932fi
7933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007935if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007936
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007937else
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
7939cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007941_ACEOF
7942
7943fi
7944
Matthias Kloseb9621712010-04-24 17:59:49 +00007945ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007946if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007948else
Martin v. Löwis11437992002-04-12 09:54:03 +00007949
7950cat >>confdefs.h <<_ACEOF
7951#define pid_t int
7952_ACEOF
7953
7954fi
7955
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007958#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007959_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007960
Matthias Kloseb9621712010-04-24 17:59:49 +00007961ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007963
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007964else
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
7966cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007968_ACEOF
7969
7970fi
7971
Matthias Kloseb9621712010-04-24 17:59:49 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7973$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007974if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007976else
Matthias Kloseb9621712010-04-24 17:59:49 +00007977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007980
7981_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007984 ac_cv_type_uid_t=yes
7985else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007986 ac_cv_type_uid_t=no
7987fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007988rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7992$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007993if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007994
Matthias Kloseb9621712010-04-24 17:59:49 +00007995$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007996
7997
Matthias Kloseb9621712010-04-24 17:59:49 +00007998$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007999
8000fi
8001
Mark Dickinson983bc162012-12-02 12:11:38 +00008002
Matthias Kloseb9621712010-04-24 17:59:49 +00008003ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008004if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005
Matthias Kloseb9621712010-04-24 17:59:49 +00008006$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008007
8008fi
8009
Stefan Krah1919b7e2012-03-21 18:25:23 +01008010ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8011if test "x$ac_cv_type___uint128_t" = xyes; then :
8012
8013$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8014
8015fi
8016
Jack Jansendd19cf82001-12-06 22:36:17 +00008017
Michael W. Hudson54241132001-12-07 15:38:26 +00008018# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008019# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020# The cast to long int works around a bug in the HP C Compiler
8021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8023# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8025$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008026if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008028else
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 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 +00008030
Martin v. Löwis11437992002-04-12 09:54:03 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 if test "$ac_cv_type_int" = yes; then
8033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008035as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008036See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 else
8038 ac_cv_sizeof_int=0
8039 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041
Martin v. Löwis11437992002-04-12 09:54:03 +00008042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8044$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045
8046
8047
Martin v. Löwis11437992002-04-12 09:54:03 +00008048cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008049#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008050_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008051
8052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053# The cast to long int works around a bug in the HP C Compiler
8054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8056# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8058$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008059if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008061else
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 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 +00008063
Martin v. Löwis11437992002-04-12 09:54:03 +00008064else
Matthias Kloseb9621712010-04-24 17:59:49 +00008065 if test "$ac_cv_type_long" = yes; then
8066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008068as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008069See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070 else
8071 ac_cv_sizeof_long=0
8072 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074
Martin v. Löwis11437992002-04-12 09:54:03 +00008075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8077$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078
8079
8080
Martin v. Löwis11437992002-04-12 09:54:03 +00008081cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008082#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008083_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008084
8085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008086# The cast to long int works around a bug in the HP C Compiler
8087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8089# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8091$as_echo_n "checking size of long long... " >&6; }
8092if ${ac_cv_sizeof_long_long+:} false; then :
8093 $as_echo_n "(cached) " >&6
8094else
8095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8096
8097else
8098 if test "$ac_cv_type_long_long" = yes; then
8099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8101as_fn_error 77 "cannot compute sizeof (long long)
8102See \`config.log' for more details" "$LINENO" 5; }
8103 else
8104 ac_cv_sizeof_long_long=0
8105 fi
8106fi
8107
8108fi
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8110$as_echo "$ac_cv_sizeof_long_long" >&6; }
8111
8112
8113
8114cat >>confdefs.h <<_ACEOF
8115#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8116_ACEOF
8117
8118
8119# The cast to long int works around a bug in the HP C Compiler
8120# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8121# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8122# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8124$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008125if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008126 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008127else
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 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 +00008129
Martin v. Löwis11437992002-04-12 09:54:03 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 if test "$ac_cv_type_void_p" = yes; then
8132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008134as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008135See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136 else
8137 ac_cv_sizeof_void_p=0
8138 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008140
Martin v. Löwis11437992002-04-12 09:54:03 +00008141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8143$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144
8145
8146
Martin v. Löwis11437992002-04-12 09:54:03 +00008147cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008148#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008149_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008150
8151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152# The cast to long int works around a bug in the HP C Compiler
8153# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8154# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8155# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8157$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008158if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008160else
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 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 +00008162
Martin v. Löwis11437992002-04-12 09:54:03 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 if test "$ac_cv_type_short" = yes; then
8165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008167as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008168See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169 else
8170 ac_cv_sizeof_short=0
8171 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008173
Martin v. Löwis11437992002-04-12 09:54:03 +00008174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8176$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177
8178
8179
Martin v. Löwis11437992002-04-12 09:54:03 +00008180cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008181#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008182_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008183
8184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008185# The cast to long int works around a bug in the HP C Compiler
8186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8188# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8190$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008191if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008193else
Matthias Kloseb9621712010-04-24 17:59:49 +00008194 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 +00008195
Martin v. Löwis11437992002-04-12 09:54:03 +00008196else
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 if test "$ac_cv_type_float" = yes; then
8198 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8199$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008200as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008201See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202 else
8203 ac_cv_sizeof_float=0
8204 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008206
Martin v. Löwis11437992002-04-12 09:54:03 +00008207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8209$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210
8211
8212
Martin v. Löwis11437992002-04-12 09:54:03 +00008213cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008214#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008215_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008216
8217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218# The cast to long int works around a bug in the HP C Compiler
8219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8221# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8223$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008224if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 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 +00008228
Martin v. Löwis11437992002-04-12 09:54:03 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 if test "$ac_cv_type_double" = yes; then
8231 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008233as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008234See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 else
8236 ac_cv_sizeof_double=0
8237 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8242$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243
8244
8245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008247#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008248_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008249
8250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251# The cast to long int works around a bug in the HP C Compiler
8252# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8253# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8254# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8256$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008257if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008259else
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 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 +00008261
Martin v. Löwis11437992002-04-12 09:54:03 +00008262else
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 if test "$ac_cv_type_fpos_t" = yes; then
8264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008266as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008267See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268 else
8269 ac_cv_sizeof_fpos_t=0
8270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008272
Martin v. Löwis11437992002-04-12 09:54:03 +00008273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8275$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008276
8277
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008280#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008282
Michael W. Hudson54241132001-12-07 15:38:26 +00008283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284# The cast to long int works around a bug in the HP C Compiler
8285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8287# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8289$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008290if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008292else
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 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 +00008294
Martin v. Löwis18e16552006-02-15 17:27:45 +00008295else
Matthias Kloseb9621712010-04-24 17:59:49 +00008296 if test "$ac_cv_type_size_t" = yes; then
8297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008299as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008300See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301 else
8302 ac_cv_sizeof_size_t=0
8303 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008305
Martin v. Löwis18e16552006-02-15 17:27:45 +00008306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8308$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309
8310
8311
Martin v. Löwis18e16552006-02-15 17:27:45 +00008312cat >>confdefs.h <<_ACEOF
8313#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8314_ACEOF
8315
8316
Christian Heimes400adb02008-02-01 08:12:03 +00008317# The cast to long int works around a bug in the HP C Compiler
8318# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8319# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8320# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8322$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008323if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008325else
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 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 +00008327
Christian Heimes400adb02008-02-01 08:12:03 +00008328else
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 if test "$ac_cv_type_pid_t" = yes; then
8330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008332as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008333See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008334 else
8335 ac_cv_sizeof_pid_t=0
8336 fi
8337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008338
Christian Heimes400adb02008-02-01 08:12:03 +00008339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8341$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008342
8343
8344
8345cat >>confdefs.h <<_ACEOF
8346#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8347_ACEOF
8348
8349
Michael W. Hudson54241132001-12-07 15:38:26 +00008350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8352$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008353have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008355/* end confdefs.h. */
8356
8357int
8358main ()
8359{
8360long double x; x = (long double)0;
8361 ;
8362 return 0;
8363}
8364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008365if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008366
8367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008369
8370 have_long_double=yes
8371
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008372fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8375$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008376if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008377# The cast to long int works around a bug in the HP C Compiler
8378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8380# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8382$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008383if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008385else
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 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 +00008387
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008388else
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 if test "$ac_cv_type_long_double" = yes; then
8390 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008392as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008393See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008394 else
8395 ac_cv_sizeof_long_double=0
8396 fi
8397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008398
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8401$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008402
8403
8404
8405cat >>confdefs.h <<_ACEOF
8406#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8407_ACEOF
8408
8409
8410fi
8411
8412
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8414$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008415have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008417/* end confdefs.h. */
8418
8419int
8420main ()
8421{
8422_Bool x; x = (_Bool)0;
8423 ;
8424 return 0;
8425}
8426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008427if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008428
8429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008431
8432 have_c99_bool=yes
8433
Thomas Woutersb2137042007-02-01 18:02:27 +00008434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8437$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008438if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439# The cast to long int works around a bug in the HP C Compiler
8440# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8441# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8442# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8444$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008445if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008447else
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 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 +00008449
Thomas Woutersb2137042007-02-01 18:02:27 +00008450else
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 if test "$ac_cv_type__Bool" = yes; then
8452 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008454as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008455See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456 else
8457 ac_cv_sizeof__Bool=0
8458 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008460
Thomas Woutersb2137042007-02-01 18:02:27 +00008461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8463$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464
8465
8466
Thomas Woutersb2137042007-02-01 18:02:27 +00008467cat >>confdefs.h <<_ACEOF
8468#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8469_ACEOF
8470
8471
8472fi
8473
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008474# The cast to long int works around a bug in the HP C Compiler
8475# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8476# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8477# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8479$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008480if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008482else
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008484#ifdef HAVE_SYS_TYPES_H
8485#include <sys/types.h>
8486#endif
8487
Matthias Kloseb9621712010-04-24 17:59:49 +00008488"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008490else
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 if test "$ac_cv_type_off_t" = yes; then
8492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008494as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008495See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008496 else
8497 ac_cv_sizeof_off_t=0
8498 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8503$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008504
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008505
8506
Martin v. Löwis11437992002-04-12 09:54:03 +00008507cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008508#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008509_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008510
Michael W. Hudson54241132001-12-07 15:38:26 +00008511
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008512
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8514$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008515if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008516 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008517
Matthias Kloseb9621712010-04-24 17:59:49 +00008518$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008519
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8521$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008525fi
8526
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008527# The cast to long int works around a bug in the HP C Compiler
8528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8530# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8532$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008533if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008535else
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008537#ifdef HAVE_SYS_TYPES_H
8538#include <sys/types.h>
8539#endif
8540#ifdef HAVE_TIME_H
8541#include <time.h>
8542#endif
8543
Matthias Kloseb9621712010-04-24 17:59:49 +00008544"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008545
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008546else
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 if test "$ac_cv_type_time_t" = yes; then
8548 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008550as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008551See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008552 else
8553 ac_cv_sizeof_time_t=0
8554 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008556
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8559$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008560
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008561
8562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008564#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008565_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008566
Michael W. Hudson54241132001-12-07 15:38:26 +00008567
8568
Trent Mick635f6fb2000-08-23 21:33:05 +00008569# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008570ac_save_cc="$CC"
8571if test "$ac_cv_kpthread" = "yes"
8572then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008573elif test "$ac_cv_kthread" = "yes"
8574then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008575elif test "$ac_cv_pthread" = "yes"
8576then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008577fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008578
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8580$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008581have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008583/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008584
8585 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008586int
8587main ()
8588{
Guido van Rossum12580492000-09-24 16:47:19 +00008589pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 ;
8591 return 0;
8592}
Matthias Kloseb159a552010-04-25 21:00:44 +00008593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008595if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008596 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8600$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008601if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008602 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8605# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8607$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008608if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008610else
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008612#ifdef HAVE_PTHREAD_H
8613#include <pthread.h>
8614#endif
8615
Matthias Kloseb9621712010-04-24 17:59:49 +00008616"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008617
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 if test "$ac_cv_type_pthread_t" = yes; then
8620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008622as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008623See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008624 else
8625 ac_cv_sizeof_pthread_t=0
8626 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628
Trent Mick635f6fb2000-08-23 21:33:05 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8631$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008632
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008633
8634
Martin v. Löwis11437992002-04-12 09:54:03 +00008635cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008636#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008637_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008639
Trent Mick635f6fb2000-08-23 21:33:05 +00008640fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008641CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008642
Michael W. Hudson54241132001-12-07 15:38:26 +00008643
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008644case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008645 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008646 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8647 ;;
8648 Darwin/*)
8649 OTHER_LIBTOOL_OPT=""
8650 ;;
8651esac
8652
8653
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008654
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008655case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008656 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008657 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8658 if test "${enable_universalsdk}"; then
8659 :
8660 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008661 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008662 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008663 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008664 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008665 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008666 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008667 if test ${gcc_version} '<' 4.0
8668 then
8669 LIBTOOL_CRUFT="-lcc_dynamic"
8670 else
8671 LIBTOOL_CRUFT=""
8672 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008674 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008675else
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008677/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008678
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008679 #include <unistd.h>
8680 int main(int argc, char*argv[])
8681 {
8682 if (sizeof(long) == 4) {
8683 return 0;
8684 } else {
8685 return 1;
8686 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008687 }
8688
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008690if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008691 ac_osx_32bit=yes
8692else
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008697fi
8698
8699
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008700 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008701 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008702 i386)
8703 MACOSX_DEFAULT_ARCH="i386"
8704 ;;
8705 ppc)
8706 MACOSX_DEFAULT_ARCH="ppc"
8707 ;;
8708 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008709 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008710 ;;
8711 esac
8712 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008713 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008714 i386)
8715 MACOSX_DEFAULT_ARCH="x86_64"
8716 ;;
8717 ppc)
8718 MACOSX_DEFAULT_ARCH="ppc64"
8719 ;;
8720 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008722 ;;
8723 esac
8724
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008725 fi
8726
8727 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008728 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008729 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008730esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8732$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008733if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008734then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008735 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008737 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008738
Matthias Kloseb9621712010-04-24 17:59:49 +00008739$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8742$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008743 if test $enable_shared = "yes"
8744 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008745 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 +00008746 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8749$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008750fi
8751
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8753$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008754case $ac_sys_system/$ac_sys_release in
8755 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008756
Matthias Kloseb9621712010-04-24 17:59:49 +00008757$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8760$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008761 ;;
8762 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008765 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008766esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008767
Guido van Rossum0a516c91994-09-12 10:58:40 +00008768# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008769
Michael W. Hudson54241132001-12-07 15:38:26 +00008770
8771
8772
8773
Benjamin Peterson99f03762010-04-11 22:15:28 +00008774
Thomas Wouters477c8d52006-05-27 19:21:47 +00008775
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008776# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8777# -- usually .so, .sl on HP-UX, .dll on Cygwin
8778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8779$as_echo_n "checking the extension of shared libraries... " >&6; }
8780if test -z "$SHLIB_SUFFIX"; then
8781 case $ac_sys_system in
8782 hp*|HP*)
8783 case `uname -m` in
8784 ia64) SHLIB_SUFFIX=.so;;
8785 *) SHLIB_SUFFIX=.sl;;
8786 esac
8787 ;;
8788 CYGWIN*) SHLIB_SUFFIX=.dll;;
8789 *) SHLIB_SUFFIX=.so;;
8790 esac
8791fi
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8793$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008794
Guido van Rossum0a516c91994-09-12 10:58:40 +00008795# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008796# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008797# (Shared libraries in this instance are shared modules to be loaded into
8798# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8800$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008801if test -z "$LDSHARED"
8802then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008803 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008804 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008805 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008806 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008807 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008808 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008809 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008811 if test "$GCC" = "yes" ; then
8812 LDSHARED='$(CC) -shared'
8813 LDCXXSHARED='$(CXX) -shared'
8814 else
8815 LDSHARED='$(CC) -G'
8816 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008817 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008818 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008819 if test "$GCC" = "yes" ; then
8820 LDSHARED='$(CC) -shared'
8821 LDCXXSHARED='$(CXX) -shared'
8822 else
8823 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008824 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008825 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008826 LDSHARED='$(CC) -bundle'
8827 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008828 if test "$enable_framework" ; then
8829 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008830 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8831 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008832 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008833 else
8834 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008835 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008836 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008837 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008838 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008839 LDSHARED='$(CC) -bundle'
8840 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008841 if test "$enable_framework" ; then
8842 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008843 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8844 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008845 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008846 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008847 # No framework, use the Python app as bundle-loader
8848 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008849 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008850 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008851 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008852 Darwin/*)
8853 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8854 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008855
Ned Deily36820b62014-06-25 13:44:22 -07008856 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8857 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8858 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8859 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8860 if test ${dep_target_major} -eq 10 && \
8861 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008862 then
Ned Deily36820b62014-06-25 13:44:22 -07008863 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008864 LDSHARED='$(CC) -bundle'
8865 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008866 if test "$enable_framework" ; then
8867 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008868 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8869 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008870 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008871 else
8872 # No framework, use the Python app as bundle-loader
8873 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8874 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008875 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008876 fi
Ned Deily36820b62014-06-25 13:44:22 -07008877 else
8878 # building for OS X 10.3 and later
8879 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8880 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8881 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008882 fi
8883 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008884 Linux*|GNU*|QNX*)
8885 LDSHARED='$(CC) -shared'
8886 LDCXXSHARED='$(CXX) -shared';;
8887 BSD/OS*/4*)
8888 LDSHARED="gcc -shared"
8889 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008890 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008891 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008892 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008893 LDSHARED='$(CC) -shared'
8894 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008895 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008896 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008897 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008898 OpenBSD*)
8899 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8900 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008901 LDSHARED='$(CC) -shared $(CCSHARED)'
8902 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008903 else
8904 case `uname -r` in
8905 [01].* | 2.[0-7] | 2.[0-7].*)
8906 LDSHARED="ld -Bshareable ${LDFLAGS}"
8907 ;;
8908 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008909 LDSHARED='$(CC) -shared $(CCSHARED)'
8910 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008911 ;;
8912 esac
8913 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008914 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008915 LDSHARED='$(CC) -shared'
8916 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008917 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008918 if test "$GCC" = "yes" ; then
8919 LDSHARED='$(CC) -shared'
8920 LDCXXSHARED='$(CXX) -shared'
8921 else
8922 LDSHARED='$(CC) -G'
8923 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008924 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008925 SCO_SV*)
8926 LDSHARED='$(CC) -Wl,-G,-Bexport'
8927 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8928 CYGWIN*)
8929 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8930 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008931 *) LDSHARED="ld";;
8932 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8935$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008936LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008937BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008938# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008939# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8941$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008942if test -z "$CCSHARED"
8943then
Guido van Rossum07397971997-04-29 21:49:50 +00008944 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008945 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008946 then CCSHARED="-fPIC";
8947 elif test `uname -p` = sparc;
8948 then CCSHARED="-xcode=pic32";
8949 else CCSHARED="-Kpic";
8950 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008951 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008952 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008953 else CCSHARED="+z";
8954 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008955 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008956 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008957 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008958 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008959 if test "$GCC" = "yes"
8960 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008961 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008962 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008963 SCO_SV*)
8964 if test "$GCC" = "yes"
8965 then CCSHARED="-fPIC"
8966 else CCSHARED="-Kpic -belf"
8967 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008968 IRIX*/6*) case $CC in
8969 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008970 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008971 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008972 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8975$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008976# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008977# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8979$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008980if test -z "$LINKFORSHARED"
8981then
Guido van Rossum07397971997-04-29 21:49:50 +00008982 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008983 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008984 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008985 LINKFORSHARED="-Wl,-E -Wl,+s";;
8986# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008987 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008988 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008989 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008991 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008992
8993 # Issue #18075: the default maximum stack size (8MBytes) is too
8994 # small for the default recursion limit. Increase the stack size
8995 # to ensure that tests don't crash
8996 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8997
Jack Jansene578a632001-08-15 01:27:14 +00008998 if test "$enable_framework"
8999 then
Jack Jansenda49e192005-01-07 13:08:22 +00009000 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009001 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009002 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009003 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009004 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009005 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009006 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009007 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9008 then
9009 LINKFORSHARED="-Wl,--export-dynamic"
9010 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009011 SunOS/5*) case $CC in
9012 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009013 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009014 then
9015 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009016 fi;;
9017 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009018 CYGWIN*)
9019 if test $enable_shared = "no"
9020 then
9021 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9022 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009023 QNX*)
9024 # -Wl,-E causes the symbols to be added to the dynamic
9025 # symbol table so that they can be found when a module
9026 # is loaded. -N 2048K causes the stack size to be set
9027 # to 2048 kilobytes so that the stack doesn't overflow
9028 # when running test_compile.py.
9029 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009030 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9033$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009034
Michael W. Hudson54241132001-12-07 15:38:26 +00009035
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009036
Matthias Kloseb9621712010-04-24 17:59:49 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9038$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009039if test ! "$LIBRARY" = "$LDLIBRARY"
9040then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009041 case $ac_sys_system in
9042 CYGWIN*)
9043 # Cygwin needs CCSHARED when building extension DLLs
9044 # but not when building the interpreter DLL.
9045 CFLAGSFORSHARED='';;
9046 *)
9047 CFLAGSFORSHARED='$(CCSHARED)'
9048 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9051$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009052
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009053# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9054# library (with --enable-shared).
9055# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009056# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9057# if it is not required, since it creates a dependency of the shared library
9058# to LIBS. This, in turn, means that applications linking the shared libpython
9059# don't need to link LIBS explicitly. The default should be only changed
9060# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009061
Matthias Kloseb9621712010-04-24 17:59:49 +00009062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9063$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009064case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009065 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009066 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009067esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9069$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009070
9071
Guido van Rossum627b2d71993-12-24 10:39:16 +00009072# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9074$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009075if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009076 $as_echo_n "(cached) " >&6
9077else
9078 ac_check_lib_save_LIBS=$LIBS
9079LIBS="-lsendfile $LIBS"
9080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9081/* end confdefs.h. */
9082
9083/* Override any GCC internal prototype to avoid an error.
9084 Use char because int might match the return type of a GCC
9085 builtin and then its argument prototype would still apply. */
9086#ifdef __cplusplus
9087extern "C"
9088#endif
9089char sendfile ();
9090int
9091main ()
9092{
9093return sendfile ();
9094 ;
9095 return 0;
9096}
9097_ACEOF
9098if ac_fn_c_try_link "$LINENO"; then :
9099 ac_cv_lib_sendfile_sendfile=yes
9100else
9101 ac_cv_lib_sendfile_sendfile=no
9102fi
9103rm -f core conftest.err conftest.$ac_objext \
9104 conftest$ac_exeext conftest.$ac_ext
9105LIBS=$ac_check_lib_save_LIBS
9106fi
9107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9108$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009109if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009110 cat >>confdefs.h <<_ACEOF
9111#define HAVE_LIBSENDFILE 1
9112_ACEOF
9113
9114 LIBS="-lsendfile $LIBS"
9115
9116fi
9117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9119$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009120if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009122else
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009124LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128/* Override any GCC internal prototype to avoid an error.
9129 Use char because int might match the return type of a GCC
9130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009131#ifdef __cplusplus
9132extern "C"
9133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009134char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009135int
9136main ()
9137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ;
9140 return 0;
9141}
9142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009145else
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009148rm -f core conftest.err conftest.$ac_objext \
9149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009150LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9153$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009154if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 cat >>confdefs.h <<_ACEOF
9156#define HAVE_LIBDL 1
9157_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009158
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009159 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009160
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009161fi
9162 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9164$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009165if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009167else
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009169LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173/* Override any GCC internal prototype to avoid an error.
9174 Use char because int might match the return type of a GCC
9175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009176#ifdef __cplusplus
9177extern "C"
9178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009179char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009180int
9181main ()
9182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ;
9185 return 0;
9186}
9187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009188if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009190else
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009193rm -f core conftest.err conftest.$ac_objext \
9194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009195LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9198$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009199if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 cat >>confdefs.h <<_ACEOF
9201#define HAVE_LIBDLD 1
9202_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009203
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009204 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009206fi
9207 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009208
Georg Brandlb1441c72009-01-03 22:33:39 +00009209# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009210if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9212$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009213if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009214 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009215else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009216 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009220/* Override any GCC internal prototype to avoid an error.
9221 Use char because int might match the return type of a GCC
9222 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009223#ifdef __cplusplus
9224extern "C"
9225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009226char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009227int
9228main ()
9229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ;
9232 return 0;
9233}
9234_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009235for ac_lib in '' pthread rt posix4; do
9236 if test -z "$ac_lib"; then
9237 ac_res="none required"
9238 else
9239 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009240 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009242 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009245rm -f core conftest.err conftest.$ac_objext \
9246 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009247 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250done
Victor Stinnere0be4232011-10-25 13:06:09 +02009251if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253else
9254 ac_cv_search_sem_init=no
9255fi
9256rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009257LIBS=$ac_func_search_save_LIBS
9258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9260$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009262if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009264
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009265fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009266 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009267 # posix4 on Solaris 2.6
9268 # pthread (first!) on Linux
9269fi
9270
Martin v. Löwis19d17342003-06-14 21:03:05 +00009271# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9273$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009274if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009276else
9277 ac_check_lib_save_LIBS=$LIBS
9278LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009280/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282/* Override any GCC internal prototype to avoid an error.
9283 Use char because int might match the return type of a GCC
9284 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009285#ifdef __cplusplus
9286extern "C"
9287#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009288char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009289int
9290main ()
9291{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009293 ;
9294 return 0;
9295}
9296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009297if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009298 ac_cv_lib_intl_textdomain=yes
9299else
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009302rm -f core conftest.err conftest.$ac_objext \
9303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009304LIBS=$ac_check_lib_save_LIBS
9305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9307$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009308if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009311
Brett Cannonc6d936e2009-06-07 20:09:53 +00009312 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009313fi
9314
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009315
9316# checks for system dependent C++ extensions support
9317case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009318 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9319$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009321/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009322
Georg Brandl59e87bd2011-02-15 19:48:59 +00009323 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009324int
9325main ()
9326{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009327loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 ;
9329 return 0;
9330}
Matthias Kloseb159a552010-04-25 21:00:44 +00009331
Martin v. Löwis11437992002-04-12 09:54:03 +00009332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009333if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009334
Matthias Kloseb159a552010-04-25 21:00:44 +00009335
Matthias Kloseb9621712010-04-24 17:59:49 +00009336$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009337
Matthias Kloseb159a552010-04-25 21:00:44 +00009338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009339$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009340
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009341else
Matthias Kloseb159a552010-04-25 21:00:44 +00009342
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009344$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009345
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009347rm -f core conftest.err conftest.$ac_objext \
9348 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009349 *) ;;
9350esac
9351
Christian Heimes985ecdc2013-11-20 11:46:18 +01009352# check for systems that require aligned memory access
9353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9354$as_echo_n "checking aligned memory access is required... " >&6; }
9355if test "$cross_compiling" = yes; then :
9356 aligned_required=yes
9357else
9358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9359/* end confdefs.h. */
9360
9361int main()
9362{
9363 char s[16];
9364 int i, *p1, *p2;
9365 for (i=0; i < 16; i++)
9366 s[i] = i;
9367 p1 = (int*)(s+1);
9368 p2 = (int*)(s+2);
9369 if (*p1 == *p2)
9370 return 1;
9371 return 0;
9372}
9373
9374_ACEOF
9375if ac_fn_c_try_run "$LINENO"; then :
9376 aligned_required=no
9377else
9378 aligned_required=yes
9379fi
9380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9381 conftest.$ac_objext conftest.beam conftest.$ac_ext
9382fi
9383
9384
9385if test "$aligned_required" = yes ; then
9386
9387$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9388
9389fi
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9391$as_echo "$aligned_required" >&6; }
9392
9393
9394# str, bytes and memoryview hash algorithm
9395
9396
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9398$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9399
9400# Check whether --with-hash_algorithm was given.
9401if test "${with_hash_algorithm+set}" = set; then :
9402 withval=$with_hash_algorithm;
9403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9404$as_echo "$withval" >&6; }
9405case "$withval" in
9406 siphash24)
9407 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9408
9409 ;;
9410 fnv)
9411 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9412
9413 ;;
9414 *)
9415 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9416 ;;
9417esac
9418
9419else
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9421$as_echo "default" >&6; }
9422fi
9423
9424
Charles-François Natalid30b0222014-05-08 23:08:51 +01009425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9426$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9427
9428# Check whether --with-address_sanitizer was given.
9429if test "${with_address_sanitizer+set}" = set; then :
9430 withval=$with_address_sanitizer;
9431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9432$as_echo "$withval" >&6; }
9433BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9434LDFLAGS="-fsanitize=address $LDFLAGS"
9435
9436else
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438$as_echo "no" >&6; }
9439fi
9440
9441
Guido van Rossum70c7f481998-03-26 18:44:10 +00009442# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9444$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009445if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009447else
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009449LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453/* Override any GCC internal prototype to avoid an error.
9454 Use char because int might match the return type of a GCC
9455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456#ifdef __cplusplus
9457extern "C"
9458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009459char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009460int
9461main ()
9462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ;
9465 return 0;
9466}
9467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009470else
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009473rm -f core conftest.err conftest.$ac_objext \
9474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009475LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9478$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009479if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009480 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009481fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009482 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9484$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009485if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009487else
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009489LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493/* Override any GCC internal prototype to avoid an error.
9494 Use char because int might match the return type of a GCC
9495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009496#ifdef __cplusplus
9497extern "C"
9498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009499char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009500int
9501main ()
9502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ;
9505 return 0;
9506}
9507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009510else
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009513rm -f core conftest.err conftest.$ac_objext \
9514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009515LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9518$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009519if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009520 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009521fi
9522 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009523
Matthias Kloseb9621712010-04-24 17:59:49 +00009524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9525$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009527# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009528if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9531$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009532LIBS="$withval $LIBS"
9533
9534else
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9536$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537fi
9538
Guido van Rossum7f43da71994-08-01 12:15:30 +00009539
Victor Stinner8291b5e2015-03-20 16:03:14 +01009540
9541
9542
9543
9544
9545
9546
9547if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9548 if test -n "$ac_tool_prefix"; then
9549 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9550set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9552$as_echo_n "checking for $ac_word... " >&6; }
9553if ${ac_cv_path_PKG_CONFIG+:} false; then :
9554 $as_echo_n "(cached) " >&6
9555else
9556 case $PKG_CONFIG in
9557 [\\/]* | ?:[\\/]*)
9558 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9559 ;;
9560 *)
9561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9562for as_dir in $PATH
9563do
9564 IFS=$as_save_IFS
9565 test -z "$as_dir" && as_dir=.
9566 for ac_exec_ext in '' $ac_executable_extensions; do
9567 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9568 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9570 break 2
9571 fi
9572done
9573 done
9574IFS=$as_save_IFS
9575
9576 ;;
9577esac
9578fi
9579PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9580if test -n "$PKG_CONFIG"; then
9581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9582$as_echo "$PKG_CONFIG" >&6; }
9583else
9584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9585$as_echo "no" >&6; }
9586fi
9587
9588
9589fi
9590if test -z "$ac_cv_path_PKG_CONFIG"; then
9591 ac_pt_PKG_CONFIG=$PKG_CONFIG
9592 # Extract the first word of "pkg-config", so it can be a program name with args.
9593set dummy pkg-config; ac_word=$2
9594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9595$as_echo_n "checking for $ac_word... " >&6; }
9596if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9597 $as_echo_n "(cached) " >&6
9598else
9599 case $ac_pt_PKG_CONFIG in
9600 [\\/]* | ?:[\\/]*)
9601 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9602 ;;
9603 *)
9604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9605for as_dir in $PATH
9606do
9607 IFS=$as_save_IFS
9608 test -z "$as_dir" && as_dir=.
9609 for ac_exec_ext in '' $ac_executable_extensions; do
9610 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9611 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9613 break 2
9614 fi
9615done
9616 done
9617IFS=$as_save_IFS
9618
9619 ;;
9620esac
9621fi
9622ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9623if test -n "$ac_pt_PKG_CONFIG"; then
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9625$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9626else
9627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9628$as_echo "no" >&6; }
9629fi
9630
9631 if test "x$ac_pt_PKG_CONFIG" = x; then
9632 PKG_CONFIG=""
9633 else
9634 case $cross_compiling:$ac_tool_warned in
9635yes:)
9636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9638ac_tool_warned=yes ;;
9639esac
9640 PKG_CONFIG=$ac_pt_PKG_CONFIG
9641 fi
9642else
9643 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9644fi
9645
9646fi
9647if test -n "$PKG_CONFIG"; then
9648 _pkg_min_version=0.9.0
9649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9650$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9651 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9653$as_echo "yes" >&6; }
9654 else
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
9657 PKG_CONFIG=""
9658 fi
9659fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009660
9661# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9663$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009664
9665# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009666if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009667 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009668else
9669 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009670fi
9671
9672
Matthias Kloseb9621712010-04-24 17:59:49 +00009673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9674$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009675
9676# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9678$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009679
9680# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009681if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009682 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009683else
9684 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009685fi
9686
9687
9688if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009689 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9690else
9691 LIBFFI_INCLUDEDIR=""
9692fi
9693
9694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9696$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009697
Stefan Krah60187b52012-03-23 19:06:27 +01009698# Check for use of the system libmpdec library
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9700$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9701
9702# Check whether --with-system_libmpdec was given.
9703if test "${with_system_libmpdec+set}" = set; then :
9704 withval=$with_system_libmpdec;
9705else
9706 with_system_libmpdec="no"
9707fi
9708
9709
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9711$as_echo "$with_system_libmpdec" >&6; }
9712
Benjamin Peterson076ed002010-10-31 17:11:02 +00009713# Check for support for loadable sqlite extensions
9714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9715$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9716# Check whether --enable-loadable-sqlite-extensions was given.
9717if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9718 enableval=$enable_loadable_sqlite_extensions;
9719else
9720 enable_loadable_sqlite_extensions="no"
9721fi
9722
9723
9724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9725$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9726
Ned Deilyd819b932013-09-06 01:07:05 -07009727# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9728
9729
9730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9731$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9732
9733# Check whether --with-tcltk-includes was given.
9734if test "${with_tcltk_includes+set}" = set; then :
9735 withval=$with_tcltk_includes;
9736else
9737 with_tcltk_includes="default"
9738fi
9739
9740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9741$as_echo "$with_tcltk_includes" >&6; }
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9743$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9744
9745# Check whether --with-tcltk-libs was given.
9746if test "${with_tcltk_libs+set}" = set; then :
9747 withval=$with_tcltk_libs;
9748else
9749 with_tcltk_libs="default"
9750fi
9751
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9753$as_echo "$with_tcltk_libs" >&6; }
9754if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9755then
9756 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9757 then
9758 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9759 fi
9760 TCLTK_INCLUDES=""
9761 TCLTK_LIBS=""
9762else
9763 TCLTK_INCLUDES="$with_tcltk_includes"
9764 TCLTK_LIBS="$with_tcltk_libs"
9765fi
9766
Matthias Klose55708cc2009-04-30 08:06:49 +00009767# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9769$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009770
9771# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009772if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009773 withval=$with_dbmliborder;
9774if test x$with_dbmliborder = xyes
9775then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009776as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009777else
9778 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9779 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9780 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009781 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009782 fi
9783 done
9784fi
9785fi
9786
Matthias Kloseb9621712010-04-24 17:59:49 +00009787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9788$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009789
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009790# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009791
9792
Matthias Kloseb9621712010-04-24 17:59:49 +00009793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9794$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009797if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798 withval=$with_signal_module;
9799fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009800
9801
9802if test -z "$with_signal_module"
9803then with_signal_module="yes"
9804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9806$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009807
9808if test "${with_signal_module}" = "yes"; then
9809 USE_SIGNAL_MODULE=""
9810 SIGNAL_OBJS=""
9811else
9812 USE_SIGNAL_MODULE="#"
9813 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9814fi
9815
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009816# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009817
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009818USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820
Martin v. Löwis11437992002-04-12 09:54:03 +00009821
9822# Templates for things AC_DEFINEd more than once.
9823# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009824
9825
Martin v. Löwis11437992002-04-12 09:54:03 +00009826
Matthias Kloseb9621712010-04-24 17:59:49 +00009827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9828$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009831if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 withval=$with_threads;
9833fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009834
9835
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009836# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009839if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840 withval=$with_thread; with_threads=$with_thread
9841fi
9842
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009843
9844if test -z "$with_threads"
9845then with_threads="yes"
9846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9848$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009849
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009850
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009851if test "$with_threads" = "no"
9852then
9853 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009854elif test "$ac_cv_pthread_is_default" = yes
9855then
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009857
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009858 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009860
9861 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009863elif test "$ac_cv_kpthread" = "yes"
9864then
9865 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009866 if test "$ac_cv_cxx_thread" = "yes"; then
9867 CXX="$CXX -Kpthread"
9868 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009870
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009871 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009872 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009873elif test "$ac_cv_kthread" = "yes"
9874then
9875 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009876 if test "$ac_cv_cxx_thread" = "yes"; then
9877 CXX="$CXX -Kthread"
9878 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009880
9881 posix_threads=yes
9882 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009883elif test "$ac_cv_pthread" = "yes"
9884then
9885 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009886 if test "$ac_cv_cxx_thread" = "yes"; then
9887 CXX="$CXX -pthread"
9888 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009890
9891 posix_threads=yes
9892 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009893else
9894 if test ! -z "$with_threads" -a -d "$with_threads"
9895 then LDFLAGS="$LDFLAGS -L$with_threads"
9896 fi
9897 if test ! -z "$withval" -a -d "$withval"
9898 then LDFLAGS="$LDFLAGS -L$withval"
9899 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009900
9901 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009902 # define _POSIX_THREADS in unistd.h. Some apparently don't
9903 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9905$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009908
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009909#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009910#ifdef _POSIX_THREADS
9911yes
9912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009913
9914_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009917 unistd_defines_pthreads=yes
9918else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009919 unistd_defines_pthreads=no
9920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009921rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009922
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9924$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009925
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009927
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009928 # Just looking for pthread_create in libpthread is not enough:
9929 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9930 # So we really have to include pthread.h, and then link.
9931 _libs=$LIBS
9932 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9934$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009936/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009937
9938#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009939#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009940
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009941void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009942int
9943main ()
9944{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009945
9946pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009947 ;
9948 return 0;
9949}
9950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009951if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009952
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9954$as_echo "yes" >&6; }
9955 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009956
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009957 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009958 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009959else
Martin v. Löwis11437992002-04-12 09:54:03 +00009960
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009961 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009963if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009964 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009965
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009966 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009967 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009968else
Guido van Rossumad678af1998-10-02 14:42:15 +00009969
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9971$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009972if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009974else
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009976LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009980/* Override any GCC internal prototype to avoid an error.
9981 Use char because int might match the return type of a GCC
9982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009983#ifdef __cplusplus
9984extern "C"
9985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009986char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009987int
9988main ()
9989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 ;
9992 return 0;
9993}
9994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009997else
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010000rm -f core conftest.err conftest.$ac_objext \
10001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010002LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10005$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010006if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010008
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010009 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010010 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010011 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010012else
Greg Steinadf63d62000-07-05 10:38:09 +000010013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10015$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010016if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010018else
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010020LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024/* Override any GCC internal prototype to avoid an error.
10025 Use char because int might match the return type of a GCC
10026 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010027#ifdef __cplusplus
10028extern "C"
10029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010030char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010031int
10032main ()
10033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010034return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 ;
10036 return 0;
10037}
10038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010039if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010040 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010041else
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010044rm -f core conftest.err conftest.$ac_objext \
10045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010046LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10049$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010050if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010052
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010053 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010054 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010055 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010056else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10059$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010060if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010062else
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010064LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068/* Override any GCC internal prototype to avoid an error.
10069 Use char because int might match the return type of a GCC
10070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010071#ifdef __cplusplus
10072extern "C"
10073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010074char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010075int
10076main ()
10077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 ;
10080 return 0;
10081}
10082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010085else
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088rm -f core conftest.err conftest.$ac_objext \
10089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010090LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10093$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010094if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010096
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010097 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010098 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010099 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010100else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010101
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10103$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010104if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010106else
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010108LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112/* Override any GCC internal prototype to avoid an error.
10113 Use char because int might match the return type of a GCC
10114 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010115#ifdef __cplusplus
10116extern "C"
10117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010118char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010119int
10120main ()
10121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 ;
10124 return 0;
10125}
10126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010129else
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010132rm -f core conftest.err conftest.$ac_objext \
10133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010134LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10137$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010138if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010140
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010141 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010142 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010143 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010144else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010145
Martin v. Löwis130fb172001-07-19 11:00:41 +000010146 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010147fi
10148
Guido van Rossum627b2d71993-12-24 10:39:16 +000010149
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010150fi
10151
Guido van Rossum0be3e491997-05-22 20:33:33 +000010152fi
10153
Guido van Rossum49545951997-12-02 19:28:29 +000010154fi
10155
Guido van Rossumb93a8621998-05-07 13:27:32 +000010156fi
10157
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010159rm -f core conftest.err conftest.$ac_objext \
10160 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010161
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10163$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010164if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010166else
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010168LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172/* Override any GCC internal prototype to avoid an error.
10173 Use char because int might match the return type of a GCC
10174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010175#ifdef __cplusplus
10176extern "C"
10177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010178char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010179int
10180main ()
10181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ;
10184 return 0;
10185}
10186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010187if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010194LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10197$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010198if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010200
Martin v. Löwis130fb172001-07-19 11:00:41 +000010201 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010202 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010203 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010204fi
10205
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010206
Neal Norwitza978ab02002-11-02 16:58:05 +000010207 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10209$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010210if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010212else
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010214LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218/* Override any GCC internal prototype to avoid an error.
10219 Use char because int might match the return type of a GCC
10220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010221#ifdef __cplusplus
10222extern "C"
10223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010224char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010225int
10226main ()
10227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 ;
10230 return 0;
10231}
10232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010235else
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010238rm -f core conftest.err conftest.$ac_objext \
10239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10243$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010244if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010246
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010247 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010248 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010249 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010250fi
10251
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010252 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010253fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010254
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010255if test "$posix_threads" = "yes"; then
10256 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010257
Matthias Kloseb9621712010-04-24 17:59:49 +000010258$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010259
10260 fi
10261
10262 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10263 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010264 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010265$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010266
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010267 ;;
10268 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010269$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010270
10271 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010272 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010274
10275 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010276 esac
10277
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10279$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010280 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010282else
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010284 ac_cv_pthread_system_supported=no
10285else
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010288
10289 #include <stdio.h>
10290 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010291 void *foo(void *parm) {
10292 return NULL;
10293 }
10294 main() {
10295 pthread_attr_t attr;
10296 pthread_t id;
10297 if (pthread_attr_init(&attr)) exit(-1);
10298 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10299 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10300 exit(0);
10301 }
10302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010303if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010304 ac_cv_pthread_system_supported=yes
10305else
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010310fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010312
Guido van Rossum627b2d71993-12-24 10:39:16 +000010313fi
10314
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10316$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010317 if test "$ac_cv_pthread_system_supported" = "yes"; then
10318
Matthias Kloseb9621712010-04-24 17:59:49 +000010319$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010320
10321 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010322 for ac_func in pthread_sigmask
10323do :
10324 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010325if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010326 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010327#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010328_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010329 case $ac_sys_system in
10330 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010331
Matthias Kloseb9621712010-04-24 17:59:49 +000010332$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010333
10334 ;;
10335 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010336fi
10337done
10338
Christian Heimesf77b4b22013-08-21 13:26:05 +020010339 for ac_func in pthread_atfork
10340do :
10341 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10342if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10343 cat >>confdefs.h <<_ACEOF
10344#define HAVE_PTHREAD_ATFORK 1
10345_ACEOF
10346
10347fi
10348done
10349
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010350fi
10351
10352
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010353# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010354
Matthias Kloseb9621712010-04-24 17:59:49 +000010355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10356$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010358if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010360 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10362$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010363 ipv6=no
10364 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10366$as_echo "yes" >&6; }
10367 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010368
10369 ipv6=yes
10370 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010372else
Martin v. Löwis11437992002-04-12 09:54:03 +000010373
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010375/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010376 /* AF_INET6 available check */
10377#include <sys/types.h>
10378#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010379int
10380main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010381{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010382int domain = AF_INET6;
10383 ;
10384 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010385}
Martin v. Löwis11437992002-04-12 09:54:03 +000010386_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010387if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010388
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10390$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010391 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010392
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010393else
Matthias Kloseb159a552010-04-25 21:00:44 +000010394
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10396$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010397 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010398
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010399fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010401
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010402if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10404$as_echo_n "checking if RFC2553 API is available... " >&6; }
10405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010407
10408 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010409#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010410int
10411main ()
10412{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010413struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010414 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 ;
10416 return 0;
10417}
Matthias Kloseb159a552010-04-25 21:00:44 +000010418
Martin v. Löwis11437992002-04-12 09:54:03 +000010419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010420if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010421
10422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010423$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010424 ipv6=yes
10425
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010426else
Matthias Kloseb159a552010-04-25 21:00:44 +000010427
10428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010429$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010430 ipv6=no
10431
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010434fi
10435
10436if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010438
10439fi
10440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441fi
10442
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010443
10444ipv6type=unknown
10445ipv6lib=none
10446ipv6trylibc=no
10447
10448if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10450$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010451 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10452 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010453 case $i in
10454 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010457
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010458#include <netinet/in.h>
10459#ifdef IPV6_INRIA_VERSION
10460yes
10461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010462_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010465 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010466fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010467rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010468
10469 ;;
10470 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010472/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010473
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010474#include <netinet/in.h>
10475#ifdef __KAME__
10476yes
10477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010478_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010481 ipv6type=$i;
10482 ipv6lib=inet6
10483 ipv6libdir=/usr/local/v6/lib
10484 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010485fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010486rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010487
10488 ;;
10489 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010491/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010492
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010493#include <features.h>
10494#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10495yes
10496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010497_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010500 ipv6type=$i;
10501 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010502fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010503rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010504
10505 ;;
10506 linux-inet6)
10507 if test -d /usr/inet6; then
10508 ipv6type=$i
10509 ipv6lib=inet6
10510 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010511 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010512 fi
10513 ;;
10514 solaris)
10515 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010516 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010517 ipv6type=$i
10518 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010519 fi
10520 fi
10521 ;;
10522 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010524/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010525
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010526#include <sys/param.h>
10527#ifdef _TOSHIBA_INET6
10528yes
10529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010530_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010533 ipv6type=$i;
10534 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010535 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010536fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010537rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010538
10539 ;;
10540 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010542/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010543
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010544#include </usr/local/v6/include/sys/v6config.h>
10545#ifdef __V6D__
10546yes
10547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010548_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010551 ipv6type=$i;
10552 ipv6lib=v6;
10553 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010554 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010555fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010556rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010557
10558 ;;
10559 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010561/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010562
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010563#include <sys/param.h>
10564#ifdef _ZETA_MINAMI_INET6
10565yes
10566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010567_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010570 ipv6type=$i;
10571 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010572 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010573fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010574rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010575
10576 ;;
10577 esac
10578 if test "$ipv6type" != "unknown"; then
10579 break
10580 fi
10581 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10583$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010584fi
10585
10586if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10587 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10588 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10589 echo "using lib$ipv6lib"
10590 else
10591 if test $ipv6trylibc = "yes"; then
10592 echo "using libc"
10593 else
10594 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10595 echo "You need to fetch lib$ipv6lib.a from appropriate"
10596 echo 'ipv6 kit and compile beforehand.'
10597 exit 1
10598 fi
10599 fi
10600fi
10601
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10603$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10605/* end confdefs.h. */
10606 /* CAN_RAW_FD_FRAMES available check */
10607#include <linux/can/raw.h>
10608int
10609main ()
10610{
10611int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10612 ;
10613 return 0;
10614}
10615_ACEOF
10616if ac_fn_c_try_compile "$LINENO"; then :
10617
10618
10619$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10620
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10622$as_echo "yes" >&6; }
10623
10624else
10625
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627$as_echo "no" >&6; }
10628
10629fi
10630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10633$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010635/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010636
10637 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010638int
10639main ()
10640{
10641FSIORefNum fRef = 0
10642 ;
10643 return 0;
10644}
Matthias Kloseb159a552010-04-25 21:00:44 +000010645
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010648
Matthias Kloseb159a552010-04-25 21:00:44 +000010649
Matthias Kloseb9621712010-04-24 17:59:49 +000010650$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010651
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10653$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010654
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010655else
Matthias Kloseb159a552010-04-25 21:00:44 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10658$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010659
10660fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10662
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010663# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10665$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010668if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669 withval=$with_doc_strings;
10670fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010671
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010672
10673if test -z "$with_doc_strings"
10674then with_doc_strings="yes"
10675fi
10676if test "$with_doc_strings" != "no"
10677then
10678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010680
10681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10683$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010684
Antoine Pitrou042b1282010-08-13 21:15:58 +000010685# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10687$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010690if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010692if test "$withval" != no
10693then
10694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10698$as_echo "yes" >&6; }
10699else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010701fi
10702else
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705fi
10706
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010707
10708# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10710$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010713if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714 withval=$with_pymalloc;
10715fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010716
Neil Schemenauera35c6882001-02-27 04:45:05 +000010717
Neil Schemenauer16c22972002-03-22 15:34:49 +000010718if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010719then
10720 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010721fi
10722if test "$with_pymalloc" != "no"
10723then
Martin v. Löwis11437992002-04-12 09:54:03 +000010724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010726
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010727 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10730$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010731
Benjamin Peterson05159c42009-12-03 03:01:27 +000010732# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10734$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010735
10736# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010737if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010738 withval=$with_valgrind;
10739else
10740 with_valgrind=no
10741fi
10742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10744$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010745if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 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 +020010747if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010750
10751else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010752 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010753
10754fi
10755
10756
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010757 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010758fi
10759
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010760# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010761
Guido van Rossum98935bf2001-09-05 19:13:16 +000010762DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010763
Guido van Rossume97ee181999-12-20 21:27:22 +000010764# the dlopen() function means we might want to use dynload_shlib.o. some
10765# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010766for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010767do :
10768 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010769if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010770 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010771#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010772_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010773
Guido van Rossume97ee181999-12-20 21:27:22 +000010774fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010775done
Guido van Rossume97ee181999-12-20 21:27:22 +000010776
Michael W. Hudson54241132001-12-07 15:38:26 +000010777
Guido van Rossume97ee181999-12-20 21:27:22 +000010778# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10779# loading of modules.
10780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10782$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010783if test -z "$DYNLOADFILE"
10784then
10785 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010786 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10787 if test "$ac_cv_func_dlopen" = yes
10788 then DYNLOADFILE="dynload_shlib.o"
10789 else DYNLOADFILE="dynload_aix.o"
10790 fi
10791 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010792 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010793 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10794 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010795 *)
10796 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10797 # out any dynamic loading
10798 if test "$ac_cv_func_dlopen" = yes
10799 then DYNLOADFILE="dynload_shlib.o"
10800 else DYNLOADFILE="dynload_stub.o"
10801 fi
10802 ;;
10803 esac
10804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10806$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010807if test "$DYNLOADFILE" != "dynload_stub.o"
10808then
Martin v. Löwis11437992002-04-12 09:54:03 +000010809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010811
10812fi
10813
Neil Schemenauer4e425612001-06-19 15:44:15 +000010814# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10815
Michael W. Hudson54241132001-12-07 15:38:26 +000010816
Matthias Kloseb9621712010-04-24 17:59:49 +000010817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10818$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010819if test -z "$MACHDEP_OBJS"
10820then
Jack Jansene578a632001-08-15 01:27:14 +000010821 MACHDEP_OBJS=$extra_machdep_objs
10822else
10823 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010824fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010825if test -z "$MACHDEP_OBJS"; then
10826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10827$as_echo "none" >&6; }
10828else
10829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10830$as_echo "$MACHDEP_OBJS" >&6; }
10831fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010832
Guido van Rossum627b2d71993-12-24 10:39:16 +000010833# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010834for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010835 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010836 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010837 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010838 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010839 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010840 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010841 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10842 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010843 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010844 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010845 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010846 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010847 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010848 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010849 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10850 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010851 sigaction sigaltstack siginterrupt sigpending sigrelse \
10852 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010853 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010854 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010855 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010856do :
10857 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10858ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010859if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010860 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010861#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010862_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010863
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010864fi
10865done
10866
Michael W. Hudson54241132001-12-07 15:38:26 +000010867
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010868ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10869 #include <dirent.h>
10870"
10871if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10872
10873$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10874
10875fi
10876
10877
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010878# For some functions, having a definition is not sufficient, since
10879# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10881$as_echo_n "checking for chroot... " >&6; }
10882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010883/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010884#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010885int
10886main ()
10887{
10888void *x=chroot
10889 ;
10890 return 0;
10891}
10892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010893if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010896
Matthias Kloseb159a552010-04-25 21:00:44 +000010897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010898$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010899else
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010902
10903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10906$as_echo_n "checking for link... " >&6; }
10907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010908/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010909#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010910int
10911main ()
10912{
10913void *x=link
10914 ;
10915 return 0;
10916}
10917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010918if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010921
Matthias Kloseb159a552010-04-25 21:00:44 +000010922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010923$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010924else
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010927
10928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10931$as_echo_n "checking for symlink... " >&6; }
10932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010933/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010934#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010935int
10936main ()
10937{
10938void *x=symlink
10939 ;
10940 return 0;
10941}
10942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010943if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010946
Matthias Kloseb159a552010-04-25 21:00:44 +000010947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010948$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010949else
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10951$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010952
10953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10956$as_echo_n "checking for fchdir... " >&6; }
10957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010958/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010959#include <unistd.h>
10960int
10961main ()
10962{
10963void *x=fchdir
10964 ;
10965 return 0;
10966}
10967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010968if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010969
Matthias Kloseb9621712010-04-24 17:59:49 +000010970$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010971
Matthias Kloseb159a552010-04-25 21:00:44 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010973$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010974else
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10976$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010977
10978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10981$as_echo_n "checking for fsync... " >&6; }
10982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010983/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010984#include <unistd.h>
10985int
10986main ()
10987{
10988void *x=fsync
10989 ;
10990 return 0;
10991}
10992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010993if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010996
Matthias Kloseb159a552010-04-25 21:00:44 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010998$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010999else
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11001$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011002
11003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11006$as_echo_n "checking for fdatasync... " >&6; }
11007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011008/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011009#include <unistd.h>
11010int
11011main ()
11012{
11013void *x=fdatasync
11014 ;
11015 return 0;
11016}
11017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011019
Matthias Kloseb9621712010-04-24 17:59:49 +000011020$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011021
Matthias Kloseb159a552010-04-25 21:00:44 +000011022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011024else
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011027
11028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11031$as_echo_n "checking for epoll... " >&6; }
11032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011033/* end confdefs.h. */
11034#include <sys/epoll.h>
11035int
11036main ()
11037{
11038void *x=epoll_create
11039 ;
11040 return 0;
11041}
11042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011044
Matthias Kloseb9621712010-04-24 17:59:49 +000011045$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011046
Matthias Kloseb159a552010-04-25 21:00:44 +000011047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011048$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011049else
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11051$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011052
11053fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11056$as_echo_n "checking for epoll_create1... " >&6; }
11057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11058/* end confdefs.h. */
11059#include <sys/epoll.h>
11060int
11061main ()
11062{
11063void *x=epoll_create1
11064 ;
11065 return 0;
11066}
11067_ACEOF
11068if ac_fn_c_try_compile "$LINENO"; then :
11069
11070$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11071
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11073$as_echo "yes" >&6; }
11074else
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11076$as_echo "no" >&6; }
11077
11078fi
11079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11081$as_echo_n "checking for kqueue... " >&6; }
11082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011083/* end confdefs.h. */
11084
11085#include <sys/types.h>
11086#include <sys/event.h>
11087
11088int
11089main ()
11090{
11091int x=kqueue()
11092 ;
11093 return 0;
11094}
11095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011096if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011097
Matthias Kloseb9621712010-04-24 17:59:49 +000011098$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011099
Matthias Kloseb159a552010-04-25 21:00:44 +000011100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011101$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011105
11106fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11109$as_echo_n "checking for prlimit... " >&6; }
11110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11111/* end confdefs.h. */
11112
11113#include <sys/time.h>
11114#include <sys/resource.h>
11115
11116int
11117main ()
11118{
11119void *x=prlimit
11120 ;
11121 return 0;
11122}
11123_ACEOF
11124if ac_fn_c_try_compile "$LINENO"; then :
11125
11126$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11127
11128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11129$as_echo "yes" >&6; }
11130else
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11132$as_echo "no" >&6; }
11133
11134fi
11135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11136
Martin v. Löwisd5843682002-11-21 20:41:28 +000011137# On some systems (eg. FreeBSD 5), we would find a definition of the
11138# functions ctermid_r, setgroups in the library, but no prototype
11139# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11140# address to avoid compiler warnings and potential miscompilations
11141# because of the missing prototypes.
11142
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11144$as_echo_n "checking for ctermid_r... " >&6; }
11145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011146/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011147
Martin v. Löwisd5843682002-11-21 20:41:28 +000011148#include <stdio.h>
11149
Martin v. Löwisd5843682002-11-21 20:41:28 +000011150int
11151main ()
11152{
11153void* p = ctermid_r
11154 ;
11155 return 0;
11156}
11157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011159
Matthias Kloseb9621712010-04-24 17:59:49 +000011160$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011161
Matthias Kloseb159a552010-04-25 21:00:44 +000011162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011163$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011164else
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11166$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011167
11168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11170
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11172$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011173if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011174 $as_echo_n "(cached) " >&6
11175else
11176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011178#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011179int
11180main ()
11181{
11182void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011183
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011184 ;
11185 return 0;
11186}
11187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011188if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011189 ac_cv_flock_decl=yes
11190else
11191 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011192
11193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011195
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011196fi
11197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11198$as_echo "$ac_cv_flock_decl" >&6; }
11199if test "x${ac_cv_flock_decl}" = xyes; then
11200 for ac_func in flock
11201do :
11202 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011203if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011204 cat >>confdefs.h <<_ACEOF
11205#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011206_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011207
Antoine Pitroua3000072010-09-07 14:52:42 +000011208else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011210$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011211if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011212 $as_echo_n "(cached) " >&6
11213else
11214 ac_check_lib_save_LIBS=$LIBS
11215LIBS="-lbsd $LIBS"
11216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11217/* end confdefs.h. */
11218
11219/* Override any GCC internal prototype to avoid an error.
11220 Use char because int might match the return type of a GCC
11221 builtin and then its argument prototype would still apply. */
11222#ifdef __cplusplus
11223extern "C"
11224#endif
11225char flock ();
11226int
11227main ()
11228{
11229return flock ();
11230 ;
11231 return 0;
11232}
11233_ACEOF
11234if ac_fn_c_try_link "$LINENO"; then :
11235 ac_cv_lib_bsd_flock=yes
11236else
11237 ac_cv_lib_bsd_flock=no
11238fi
11239rm -f core conftest.err conftest.$ac_objext \
11240 conftest$ac_exeext conftest.$ac_ext
11241LIBS=$ac_check_lib_save_LIBS
11242fi
11243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11244$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011245if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011246 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011247
11248
11249$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11250
11251
11252fi
11253
11254
11255fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011256done
11257
Antoine Pitroua3000072010-09-07 14:52:42 +000011258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11261$as_echo_n "checking for getpagesize... " >&6; }
11262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011264
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011265#include <unistd.h>
11266
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011267int
11268main ()
11269{
11270void* p = getpagesize
11271 ;
11272 return 0;
11273}
11274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011275if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011276
Matthias Kloseb9621712010-04-24 17:59:49 +000011277$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011278
Matthias Kloseb159a552010-04-25 21:00:44 +000011279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011281else
Matthias Kloseb9621712010-04-24 17:59:49 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011284
11285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011287
Victor Stinner984890f2011-11-24 13:53:38 +010011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11289$as_echo_n "checking for broken unsetenv... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11291/* end confdefs.h. */
11292
11293#include <stdlib.h>
11294
11295int
11296main ()
11297{
11298int res = unsetenv("DUMMY")
11299 ;
11300 return 0;
11301}
11302_ACEOF
11303if ac_fn_c_try_compile "$LINENO"; then :
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305$as_echo "no" >&6; }
11306else
11307
11308$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11309
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11311$as_echo "yes" >&6; }
11312
11313fi
11314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11315
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011316for ac_prog in true
11317do
11318 # Extract the first word of "$ac_prog", so it can be a program name with args.
11319set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11321$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011322if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011324else
11325 if test -n "$TRUE"; then
11326 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11327else
11328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11329for as_dir in $PATH
11330do
11331 IFS=$as_save_IFS
11332 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011334 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011335 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011336 $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 +000011337 break 2
11338 fi
11339done
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011342
11343fi
11344fi
11345TRUE=$ac_cv_prog_TRUE
11346if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11348$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011349else
Matthias Kloseb9621712010-04-24 17:59:49 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011352fi
11353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011354
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011355 test -n "$TRUE" && break
11356done
11357test -n "$TRUE" || TRUE="/bin/true"
11358
11359
Matthias Kloseb9621712010-04-24 17:59:49 +000011360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11361$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011362if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011364else
11365 ac_check_lib_save_LIBS=$LIBS
11366LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370/* Override any GCC internal prototype to avoid an error.
11371 Use char because int might match the return type of a GCC
11372 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011373#ifdef __cplusplus
11374extern "C"
11375#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011376char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011377int
11378main ()
11379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011381 ;
11382 return 0;
11383}
11384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011385if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011386 ac_cv_lib_c_inet_aton=yes
11387else
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011390rm -f core conftest.err conftest.$ac_objext \
11391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011392LIBS=$ac_check_lib_save_LIBS
11393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11395$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011396if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011397 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011398else
Matthias Kloseb9621712010-04-24 17:59:49 +000011399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11400$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011401if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011402 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011403else
11404 ac_check_lib_save_LIBS=$LIBS
11405LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011407/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409/* Override any GCC internal prototype to avoid an error.
11410 Use char because int might match the return type of a GCC
11411 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011412#ifdef __cplusplus
11413extern "C"
11414#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011415char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011416int
11417main ()
11418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011419return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011420 ;
11421 return 0;
11422}
11423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011425 ac_cv_lib_resolv_inet_aton=yes
11426else
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011429rm -f core conftest.err conftest.$ac_objext \
11430 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011431LIBS=$ac_check_lib_save_LIBS
11432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11434$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011435if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011436 cat >>confdefs.h <<_ACEOF
11437#define HAVE_LIBRESOLV 1
11438_ACEOF
11439
11440 LIBS="-lresolv $LIBS"
11441
11442fi
11443
11444
11445fi
11446
11447
Christian Heimesd0764e22007-12-04 15:00:33 +000011448# On Tru64, chflags seems to be present, but calling it will
11449# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11451$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011452if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011454else
Matthias Kloseb9621712010-04-24 17:59:49 +000011455 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011456 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011457else
Matthias Kloseb9621712010-04-24 17:59:49 +000011458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011459/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011460
Christian Heimesd0764e22007-12-04 15:00:33 +000011461#include <sys/stat.h>
11462#include <unistd.h>
11463int main(int argc, char*argv[])
11464{
11465 if(chflags(argv[0], 0) != 0)
11466 return 1;
11467 return 0;
11468}
Ned Deily3eb67d52011-06-28 00:00:28 -070011469
Christian Heimesd0764e22007-12-04 15:00:33 +000011470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011471if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011472 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011473else
Matthias Kloseb9621712010-04-24 17:59:49 +000011474 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11477 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011478fi
11479
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011480
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11483$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011484if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011485 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011486if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011487 ac_cv_have_chflags="yes"
11488else
11489 ac_cv_have_chflags="no"
11490fi
11491
11492fi
11493if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011494
Matthias Kloseb9621712010-04-24 17:59:49 +000011495$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011496
11497fi
11498
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11500$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011501if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011503else
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011505 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011508/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011509
Christian Heimesd0764e22007-12-04 15:00:33 +000011510#include <sys/stat.h>
11511#include <unistd.h>
11512int main(int argc, char*argv[])
11513{
11514 if(lchflags(argv[0], 0) != 0)
11515 return 1;
11516 return 0;
11517}
Ned Deily3eb67d52011-06-28 00:00:28 -070011518
Christian Heimesd0764e22007-12-04 15:00:33 +000011519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011520if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011521 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011522else
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011524fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011527fi
11528
11529
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11532$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011533if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011535if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011536 ac_cv_have_lchflags="yes"
11537else
11538 ac_cv_have_lchflags="no"
11539fi
11540
11541fi
11542if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011543
Matthias Kloseb9621712010-04-24 17:59:49 +000011544$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011545
11546fi
11547
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011548case $ac_sys_system/$ac_sys_release in
11549Darwin/*)
11550 _CUR_CFLAGS="${CFLAGS}"
11551 _CUR_LDFLAGS="${LDFLAGS}"
11552 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11553 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11554 ;;
11555esac
11556
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11558$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011559if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011561else
11562 ac_check_lib_save_LIBS=$LIBS
11563LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011565/* end confdefs.h. */
11566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567/* Override any GCC internal prototype to avoid an error.
11568 Use char because int might match the return type of a GCC
11569 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011570#ifdef __cplusplus
11571extern "C"
11572#endif
11573char inflateCopy ();
11574int
11575main ()
11576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011578 ;
11579 return 0;
11580}
11581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011583 ac_cv_lib_z_inflateCopy=yes
11584else
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011587rm -f core conftest.err conftest.$ac_objext \
11588 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011589LIBS=$ac_check_lib_save_LIBS
11590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11592$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011593if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011596
11597fi
11598
11599
11600case $ac_sys_system/$ac_sys_release in
11601Darwin/*)
11602 CFLAGS="${_CUR_CFLAGS}"
11603 LDFLAGS="${_CUR_LDFLAGS}"
11604 ;;
11605esac
11606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11608$as_echo_n "checking for hstrerror... " >&6; }
11609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011610/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011611
Martin v. Löwise9416172003-05-03 10:12:45 +000011612#include <netdb.h>
11613
Martin v. Löwise9416172003-05-03 10:12:45 +000011614int
11615main ()
11616{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011617void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011618 ;
11619 return 0;
11620}
11621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011623
Matthias Kloseb9621712010-04-24 17:59:49 +000011624$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011625
Matthias Kloseb159a552010-04-25 21:00:44 +000011626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011627$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011628else
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11630$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011631
11632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011633rm -f core conftest.err conftest.$ac_objext \
11634 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11637$as_echo_n "checking for inet_aton... " >&6; }
11638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011640
Martin v. Löwis86d66262006-02-17 08:40:11 +000011641#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011642#include <sys/socket.h>
11643#include <netinet/in.h>
11644#include <arpa/inet.h>
11645
Martin v. Löwise9416172003-05-03 10:12:45 +000011646int
11647main ()
11648{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011649void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011650 ;
11651 return 0;
11652}
11653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011655
Matthias Kloseb9621712010-04-24 17:59:49 +000011656$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011657
Matthias Kloseb159a552010-04-25 21:00:44 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011659$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011660else
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11662$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011663
11664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011665rm -f core conftest.err conftest.$ac_objext \
11666 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11669$as_echo_n "checking for inet_pton... " >&6; }
11670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011671/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011672
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011673#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011674#include <sys/socket.h>
11675#include <netinet/in.h>
11676#include <arpa/inet.h>
11677
Martin v. Löwise9416172003-05-03 10:12:45 +000011678int
11679main ()
11680{
11681void* p = inet_pton
11682 ;
11683 return 0;
11684}
11685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011686if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011689
Matthias Kloseb159a552010-04-25 21:00:44 +000011690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011691$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011692else
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11694$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011695
11696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011698
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011699# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11701$as_echo_n "checking for setgroups... " >&6; }
11702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011703/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011704
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011705#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011706#ifdef HAVE_GRP_H
11707#include <grp.h>
11708#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011709
Martin v. Löwisd5843682002-11-21 20:41:28 +000011710int
11711main ()
11712{
11713void* p = setgroups
11714 ;
11715 return 0;
11716}
11717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011718if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011721
Matthias Kloseb159a552010-04-25 21:00:44 +000011722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011723$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011727
11728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011730
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011731# check for openpty and forkpty
11732
11733for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011734do :
11735 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011736if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011738#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011739_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011740
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011741else
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11743$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011744if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011746else
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011748LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011752/* Override any GCC internal prototype to avoid an error.
11753 Use char because int might match the return type of a GCC
11754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011755#ifdef __cplusplus
11756extern "C"
11757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011758char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011759int
11760main ()
11761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011762return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 ;
11764 return 0;
11765}
11766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011772rm -f core conftest.err conftest.$ac_objext \
11773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011774LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11777$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011778if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011780 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11783$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011784if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011786else
11787 ac_check_lib_save_LIBS=$LIBS
11788LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011790/* end confdefs.h. */
11791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011792/* Override any GCC internal prototype to avoid an error.
11793 Use char because int might match the return type of a GCC
11794 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011795#ifdef __cplusplus
11796extern "C"
11797#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011798char openpty ();
11799int
11800main ()
11801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011803 ;
11804 return 0;
11805}
11806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011808 ac_cv_lib_bsd_openpty=yes
11809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011812rm -f core conftest.err conftest.$ac_objext \
11813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011814LIBS=$ac_check_lib_save_LIBS
11815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11817$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011818if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011820 LIBS="$LIBS -lbsd"
11821fi
11822
11823
11824fi
11825
Fred Drake8cef4cf2000-06-28 16:40:38 +000011826
11827fi
11828done
11829
11830for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011831do :
11832 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011833if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011836_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011837
Fred Drake8cef4cf2000-06-28 16:40:38 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11840$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011841if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011843else
Martin v. Löwis11437992002-04-12 09:54:03 +000011844 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011845LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011849/* Override any GCC internal prototype to avoid an error.
11850 Use char because int might match the return type of a GCC
11851 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011852#ifdef __cplusplus
11853extern "C"
11854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011855char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011856int
11857main ()
11858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011859return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011860 ;
11861 return 0;
11862}
11863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011864if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011865 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011869rm -f core conftest.err conftest.$ac_objext \
11870 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011871LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11874$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011875if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011877 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11880$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011881if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011883else
11884 ac_check_lib_save_LIBS=$LIBS
11885LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011887/* end confdefs.h. */
11888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011889/* Override any GCC internal prototype to avoid an error.
11890 Use char because int might match the return type of a GCC
11891 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011892#ifdef __cplusplus
11893extern "C"
11894#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011895char forkpty ();
11896int
11897main ()
11898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011899return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011900 ;
11901 return 0;
11902}
11903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011905 ac_cv_lib_bsd_forkpty=yes
11906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011909rm -f core conftest.err conftest.$ac_objext \
11910 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011911LIBS=$ac_check_lib_save_LIBS
11912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11914$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011915if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011917 LIBS="$LIBS -lbsd"
11918fi
11919
11920
11921fi
11922
Fred Drake8cef4cf2000-06-28 16:40:38 +000011923
11924fi
11925done
11926
Jack Jansendd19cf82001-12-06 22:36:17 +000011927
Christian Heimesb186d002008-03-18 15:15:01 +000011928# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011929for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011930do :
11931 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011932if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011933 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011934#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011935_ACEOF
11936
11937fi
11938done
11939
11940
Michael W. Hudson54241132001-12-07 15:38:26 +000011941# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011942for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011943do :
11944 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11945ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011946if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011947 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011949_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011950
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011951fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011952done
11953
Michael W. Hudson54241132001-12-07 15:38:26 +000011954
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011955ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011956if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011957 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011958
Martin v. Löwis1142de32002-03-29 16:28:31 +000011959else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011960 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011961 *" dup2.$ac_objext "* ) ;;
11962 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011963 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011964esac
11965
Martin v. Löwis1142de32002-03-29 16:28:31 +000011966fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011967
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011968ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011969if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011970 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11971
11972else
11973 case " $LIBOBJS " in
11974 *" strdup.$ac_objext "* ) ;;
11975 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11976 ;;
11977esac
11978
11979fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011980
11981
11982for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011983do :
11984 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011985if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011986 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011987#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011991#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011992int
11993main ()
11994{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011995getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011996 ;
11997 return 0;
11998}
11999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012003
Guido van Rossum627b2d71993-12-24 10:39:16 +000012004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012006
Guido van Rossum627b2d71993-12-24 10:39:16 +000012007fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012008done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012009
Jack Jansen150753c2003-03-29 22:07:47 +000012010for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012011do :
12012 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012014 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012015#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012019#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012020int
12021main ()
12022{
12023setpgrp(0,0);
12024 ;
12025 return 0;
12026}
12027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012029
Matthias Kloseb9621712010-04-24 17:59:49 +000012030$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012031
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012034
12035fi
12036done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012037
Thomas Wouters3a584202000-08-05 23:28:51 +000012038for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012039do :
12040 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012041if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012042 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012043#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012046/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012047#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012048int
12049main ()
12050{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 ;
12053 return 0;
12054}
12055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012056if ac_fn_c_try_compile "$LINENO"; then :
12057
Guido van Rossum627b2d71993-12-24 10:39:16 +000012058else
Skip Montanaro6dead952003-09-25 14:50:04 +000012059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012061
Martin v. Löwis11437992002-04-12 09:54:03 +000012062
Guido van Rossum627b2d71993-12-24 10:39:16 +000012063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012065
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012066fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012067done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012068
Michael W. Hudson54241132001-12-07 15:38:26 +000012069
Victor Stinnere0be4232011-10-25 13:06:09 +020012070for ac_func in clock_gettime
12071do :
12072 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12073if test "x$ac_cv_func_clock_gettime" = xyes; then :
12074 cat >>confdefs.h <<_ACEOF
12075#define HAVE_CLOCK_GETTIME 1
12076_ACEOF
12077
12078else
12079
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12081$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12082if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12083 $as_echo_n "(cached) " >&6
12084else
12085 ac_check_lib_save_LIBS=$LIBS
12086LIBS="-lrt $LIBS"
12087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12088/* end confdefs.h. */
12089
12090/* Override any GCC internal prototype to avoid an error.
12091 Use char because int might match the return type of a GCC
12092 builtin and then its argument prototype would still apply. */
12093#ifdef __cplusplus
12094extern "C"
12095#endif
12096char clock_gettime ();
12097int
12098main ()
12099{
12100return clock_gettime ();
12101 ;
12102 return 0;
12103}
12104_ACEOF
12105if ac_fn_c_try_link "$LINENO"; then :
12106 ac_cv_lib_rt_clock_gettime=yes
12107else
12108 ac_cv_lib_rt_clock_gettime=no
12109fi
12110rm -f core conftest.err conftest.$ac_objext \
12111 conftest$ac_exeext conftest.$ac_ext
12112LIBS=$ac_check_lib_save_LIBS
12113fi
12114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12115$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12116if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12117
Victor Stinner7efb8332014-08-29 15:41:08 +020012118 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012119 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12120
12121
12122$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12123
12124
12125fi
12126
12127
12128fi
12129done
12130
12131
12132for ac_func in clock_getres
12133do :
12134 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12135if test "x$ac_cv_func_clock_getres" = xyes; then :
12136 cat >>confdefs.h <<_ACEOF
12137#define HAVE_CLOCK_GETRES 1
12138_ACEOF
12139
12140else
12141
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12143$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12144if ${ac_cv_lib_rt_clock_getres+:} false; then :
12145 $as_echo_n "(cached) " >&6
12146else
12147 ac_check_lib_save_LIBS=$LIBS
12148LIBS="-lrt $LIBS"
12149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12150/* end confdefs.h. */
12151
12152/* Override any GCC internal prototype to avoid an error.
12153 Use char because int might match the return type of a GCC
12154 builtin and then its argument prototype would still apply. */
12155#ifdef __cplusplus
12156extern "C"
12157#endif
12158char clock_getres ();
12159int
12160main ()
12161{
12162return clock_getres ();
12163 ;
12164 return 0;
12165}
12166_ACEOF
12167if ac_fn_c_try_link "$LINENO"; then :
12168 ac_cv_lib_rt_clock_getres=yes
12169else
12170 ac_cv_lib_rt_clock_getres=no
12171fi
12172rm -f core conftest.err conftest.$ac_objext \
12173 conftest$ac_exeext conftest.$ac_ext
12174LIBS=$ac_check_lib_save_LIBS
12175fi
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12177$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12178if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12179
12180 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12181
12182
12183fi
12184
12185
12186fi
12187done
12188
12189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12191$as_echo_n "checking for major... " >&6; }
12192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012193/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012194
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012195#if defined(MAJOR_IN_MKDEV)
12196#include <sys/mkdev.h>
12197#elif defined(MAJOR_IN_SYSMACROS)
12198#include <sys/sysmacros.h>
12199#else
12200#include <sys/types.h>
12201#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012202
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012203int
12204main ()
12205{
12206
12207 makedev(major(0),minor(0));
12208
12209 ;
12210 return 0;
12211}
12212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012214
12215
Matthias Kloseb9621712010-04-24 17:59:49 +000012216$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12219$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012220
12221else
Skip Montanaro6dead952003-09-25 14:50:04 +000012222
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12224$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012225
12226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012227rm -f core conftest.err conftest.$ac_objext \
12228 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012229
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012230# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012231# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12233$as_echo_n "checking for getaddrinfo... " >&6; }
12234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012235/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012236
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012237#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012238#include <sys/socket.h>
12239#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012240#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012241
Martin v. Löwis11437992002-04-12 09:54:03 +000012242int
12243main ()
12244{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012245getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012246 ;
12247 return 0;
12248}
12249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012250if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012251 have_getaddrinfo=yes
12252else
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012255rm -f core conftest.err conftest.$ac_objext \
12256 conftest$ac_exeext conftest.$ac_ext
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12258$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012259if test $have_getaddrinfo = yes
12260then
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12262$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012263 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012265else
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012267
12268if test "${enable_ipv6+set}" = set; then
12269 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12270else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012271 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012272fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012275/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012276
Stefan Krah19c21392012-11-22 23:47:32 +010012277#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012278#include <sys/types.h>
12279#include <netdb.h>
12280#include <string.h>
12281#include <sys/socket.h>
12282#include <netinet/in.h>
12283
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012284int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012285{
12286 int passive, gaierr, inet4 = 0, inet6 = 0;
12287 struct addrinfo hints, *ai, *aitop;
12288 char straddr[INET6_ADDRSTRLEN], strport[16];
12289
12290 for (passive = 0; passive <= 1; passive++) {
12291 memset(&hints, 0, sizeof(hints));
12292 hints.ai_family = AF_UNSPEC;
12293 hints.ai_flags = passive ? AI_PASSIVE : 0;
12294 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012295 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012296 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12297 (void)gai_strerror(gaierr);
12298 goto bad;
12299 }
12300 for (ai = aitop; ai; ai = ai->ai_next) {
12301 if (ai->ai_addr == NULL ||
12302 ai->ai_addrlen == 0 ||
12303 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12304 straddr, sizeof(straddr), strport, sizeof(strport),
12305 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12306 goto bad;
12307 }
12308 switch (ai->ai_family) {
12309 case AF_INET:
12310 if (strcmp(strport, "54321") != 0) {
12311 goto bad;
12312 }
12313 if (passive) {
12314 if (strcmp(straddr, "0.0.0.0") != 0) {
12315 goto bad;
12316 }
12317 } else {
12318 if (strcmp(straddr, "127.0.0.1") != 0) {
12319 goto bad;
12320 }
12321 }
12322 inet4++;
12323 break;
12324 case AF_INET6:
12325 if (strcmp(strport, "54321") != 0) {
12326 goto bad;
12327 }
12328 if (passive) {
12329 if (strcmp(straddr, "::") != 0) {
12330 goto bad;
12331 }
12332 } else {
12333 if (strcmp(straddr, "::1") != 0) {
12334 goto bad;
12335 }
12336 }
12337 inet6++;
12338 break;
12339 case AF_UNSPEC:
12340 goto bad;
12341 break;
12342 default:
12343 /* another family support? */
12344 break;
12345 }
12346 }
12347 }
12348
12349 if (!(inet4 == 0 || inet4 == 2))
12350 goto bad;
12351 if (!(inet6 == 0 || inet6 == 2))
12352 goto bad;
12353
12354 if (aitop)
12355 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012356 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012357
12358 bad:
12359 if (aitop)
12360 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012361 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012362}
12363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012365if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012366 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012367else
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012370rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12371 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012374fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012375
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12379$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12380
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012381if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012382then
12383 if test $ipv6 = yes
12384 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385 echo 'Fatal: You must get working getaddrinfo() function.'
12386 echo ' or you can specify "--disable-ipv6"'.
12387 exit 1
12388 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012389else
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012392
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012393fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012394
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012395for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012396do :
12397 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012398if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012401_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403fi
12404done
12405
Michael W. Hudson54241132001-12-07 15:38:26 +000012406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012407# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12409$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012410if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012412else
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415#include <sys/types.h>
12416#include <sys/time.h>
12417#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012418
Martin v. Löwis11437992002-04-12 09:54:03 +000012419int
12420main ()
12421{
12422if ((struct tm *) 0)
12423return 0;
12424 ;
12425 return 0;
12426}
12427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012429 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012430else
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12436$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012437if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012438
Matthias Kloseb9621712010-04-24 17:59:49 +000012439$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440
12441fi
12442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12444$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012445if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012447else
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012449/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012450#include <sys/types.h>
12451#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012452
Martin v. Löwis11437992002-04-12 09:54:03 +000012453int
12454main ()
12455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456struct tm tm;
12457 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 ;
12460 return 0;
12461}
12462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012463if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012464 ac_cv_struct_tm=time.h
12465else
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12471$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012472if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
Matthias Kloseb9621712010-04-24 17:59:49 +000012474$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475
12476fi
12477
Matthias Kloseb9621712010-04-24 17:59:49 +000012478ac_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 +000012479#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481"
Victor Stinnere0be4232011-10-25 13:06:09 +020012482if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
12484cat >>confdefs.h <<_ACEOF
12485#define HAVE_STRUCT_TM_TM_ZONE 1
12486_ACEOF
12487
12488
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012490
Martin v. Löwis11437992002-04-12 09:54:03 +000012491if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494
12495else
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12497"
Victor Stinnere0be4232011-10-25 13:06:09 +020012498if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500else
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502fi
12503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012505#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506_ACEOF
12507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12509$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012511 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512else
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012514/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012515#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516#if !HAVE_DECL_TZNAME
12517extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520int
12521main ()
12522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 ;
12525 return 0;
12526}
12527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012529 ac_cv_var_tzname=yes
12530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012533rm -f core conftest.err conftest.$ac_objext \
12534 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12537$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012538 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Matthias Kloseb9621712010-04-24 17:59:49 +000012540$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012541
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012542 fi
12543fi
12544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545ac_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 +020012546if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
12548cat >>confdefs.h <<_ACEOF
12549#define HAVE_STRUCT_STAT_ST_RDEV 1
12550_ACEOF
12551
12552
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012553fi
12554
Matthias Kloseb9621712010-04-24 17:59:49 +000012555ac_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 +020012556if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012557
Martin v. Löwis11437992002-04-12 09:54:03 +000012558cat >>confdefs.h <<_ACEOF
12559#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12560_ACEOF
12561
12562
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012563fi
12564
Matthias Kloseb9621712010-04-24 17:59:49 +000012565ac_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 +020012566if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012567
12568cat >>confdefs.h <<_ACEOF
12569#define HAVE_STRUCT_STAT_ST_FLAGS 1
12570_ACEOF
12571
12572
12573fi
12574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575ac_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 +020012576if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012577
12578cat >>confdefs.h <<_ACEOF
12579#define HAVE_STRUCT_STAT_ST_GEN 1
12580_ACEOF
12581
12582
12583fi
12584
Matthias Kloseb9621712010-04-24 17:59:49 +000012585ac_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 +020012586if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012587
12588cat >>confdefs.h <<_ACEOF
12589#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12590_ACEOF
12591
12592
12593fi
12594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595ac_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 +020012596if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012597
Martin v. Löwis11437992002-04-12 09:54:03 +000012598cat >>confdefs.h <<_ACEOF
12599#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12600_ACEOF
12601
12602
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012603fi
12604
Stefan Krah267b6392016-04-26 01:09:18 +020012605ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12606 #include <sys/types.h>
12607 #include <pwd.h>
12608
12609"
12610if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12611
12612cat >>confdefs.h <<_ACEOF
12613#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12614_ACEOF
12615
12616
12617fi
12618ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12619 #include <sys/types.h>
12620 #include <pwd.h>
12621
12622"
12623if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12624
12625cat >>confdefs.h <<_ACEOF
12626#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12627_ACEOF
12628
12629
12630fi
12631
Michael W. Hudson54241132001-12-07 15:38:26 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12634$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012635if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637else
Matthias Kloseb159a552010-04-25 21:00:44 +000012638
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012640/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012641#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012642int
12643main ()
12644{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 ;
12647 return 0;
12648}
12649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012650if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651 ac_cv_header_time_altzone=yes
12652else
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657fi
12658
Matthias Kloseb9621712010-04-24 17:59:49 +000012659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12660$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012662
Matthias Kloseb9621712010-04-24 17:59:49 +000012663$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012664
12665fi
12666
Guido van Rossumda88dad1995-01-26 00:46:29 +000012667was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12669$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012671/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012672
12673#include <sys/types.h>
12674#include <sys/select.h>
12675#include <sys/time.h>
12676
Martin v. Löwis11437992002-04-12 09:54:03 +000012677int
12678main ()
12679{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012680;
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ;
12682 return 0;
12683}
12684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012685if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
12687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012690 was_it_defined=yes
12691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12695$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12698$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012699if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701else
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012703/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012704#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012705int
12706main ()
12707{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012708struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ;
12710 return 0;
12711}
12712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012713if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012714 ac_cv_struct_addrinfo=yes
12715else
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12719fi
12720
Matthias Kloseb9621712010-04-24 17:59:49 +000012721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12722$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012723if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Matthias Kloseb9621712010-04-24 17:59:49 +000012725$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012726
12727fi
12728
Matthias Kloseb9621712010-04-24 17:59:49 +000012729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12730$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012731if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012732 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012735/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012736
12737# include <sys/types.h>
12738# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012739int
12740main ()
12741{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012742struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 ;
12744 return 0;
12745}
12746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012747if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012748 ac_cv_struct_sockaddr_storage=yes
12749else
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12753fi
12754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12756$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012757if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760
12761fi
12762
Christian Heimesdffa3942016-09-05 23:54:41 +020012763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12764$as_echo_n "checking for sockaddr_alg... " >&6; }
12765if ${ac_cv_struct_sockaddr_alg+:} false; then :
12766 $as_echo_n "(cached) " >&6
12767else
12768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12769/* end confdefs.h. */
12770
12771# include <sys/types.h>
12772# include <sys/socket.h>
12773# include <linux/if_alg.h>
12774int
12775main ()
12776{
12777struct sockaddr_alg s
12778 ;
12779 return 0;
12780}
12781_ACEOF
12782if ac_fn_c_try_compile "$LINENO"; then :
12783 ac_cv_struct_sockaddr_alg=yes
12784else
12785 ac_cv_struct_sockaddr_alg=no
12786fi
12787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12788fi
12789
12790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12791$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12792if test $ac_cv_struct_sockaddr_alg = yes; then
12793
12794$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12795
12796fi
12797
Guido van Rossum627b2d71993-12-24 10:39:16 +000012798# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12801$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012802if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012804else
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012807$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012808int
12809main ()
12810{
12811static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012812test_array [0] = 0;
12813return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012814
12815 ;
12816 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012817}
Martin v. Löwis11437992002-04-12 09:54:03 +000012818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012819if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012820 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012821else
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12827$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012828if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012830
12831fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12834$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012835if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012836 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012839/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012840
Martin v. Löwis11437992002-04-12 09:54:03 +000012841int
12842main ()
12843{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012844
Martin v. Löwis11437992002-04-12 09:54:03 +000012845#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012846 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012848 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850 char const *const *pcpcc;
12851 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 /* NEC SVR4.0.2 mips cc rejects this. */
12853 struct point {int x, y;};
12854 static struct point const zero = {0,0};
12855 /* AIX XL C 1.02.0.0 rejects this.
12856 It does not let you subtract one const X* pointer from another in
12857 an arm of an if-expression whose if-part is not a constant
12858 expression */
12859 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862 ++pcpcc;
12863 ppc = (char**) pcpcc;
12864 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012865 { /* SCO 3.2v4 cc rejects this sort of thing. */
12866 char tx;
12867 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012869
Martin v. Löwis11437992002-04-12 09:54:03 +000012870 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 }
12873 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12874 int x[] = {25, 17};
12875 const int *foo = &x[0];
12876 ++foo;
12877 }
12878 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12879 typedef const int *iptr;
12880 iptr p = 0;
12881 ++p;
12882 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012883 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012885 struct s { int j; const int *ap[3]; } bx;
12886 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 }
12888 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12889 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012893#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012894
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ;
12896 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012897}
Martin v. Löwis11437992002-04-12 09:54:03 +000012898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012899if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012900 ac_cv_c_const=yes
12901else
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12907$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012908if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012911
12912fi
12913
Michael W. Hudson54241132001-12-07 15:38:26 +000012914
Guido van Rossumda88dad1995-01-26 00:46:29 +000012915works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12917$as_echo_n "checking for working volatile... " >&6; }
12918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012919/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012920
Martin v. Löwis11437992002-04-12 09:54:03 +000012921int
12922main ()
12923{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012924volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 ;
12926 return 0;
12927}
12928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012929if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012930 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012931else
Skip Montanaro6dead952003-09-25 14:50:04 +000012932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012934
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012935
Guido van Rossum627b2d71993-12-24 10:39:16 +000012936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12939$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012940
Guido van Rossumda88dad1995-01-26 00:46:29 +000012941works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12943$as_echo_n "checking for working signed char... " >&6; }
12944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012945/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012946
Martin v. Löwis11437992002-04-12 09:54:03 +000012947int
12948main ()
12949{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ;
12952 return 0;
12953}
12954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012955if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012956 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012957else
Skip Montanaro6dead952003-09-25 14:50:04 +000012958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012960
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012961
Guido van Rossum7f43da71994-08-01 12:15:30 +000012962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12965$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012966
Guido van Rossumda88dad1995-01-26 00:46:29 +000012967have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12969$as_echo_n "checking for prototypes... " >&6; }
12970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012971/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012972int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012973int
12974main ()
12975{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012976return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 ;
12978 return 0;
12979}
12980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012981if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012984
Matthias Kloseb159a552010-04-25 21:00:44 +000012985 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12989$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012990
Guido van Rossumda88dad1995-01-26 00:46:29 +000012991works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12993$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012995/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012996
12997#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012998int foo(int x, ...) {
12999 va_list va;
13000 va_start(va, x);
13001 va_arg(va, int);
13002 va_arg(va, char *);
13003 va_arg(va, double);
13004 return 0;
13005}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013006
Martin v. Löwis11437992002-04-12 09:54:03 +000013007int
13008main ()
13009{
Guido van Rossum90eea071996-08-30 20:58:57 +000013010return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ;
13012 return 0;
13013}
13014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013015if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
13017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013019
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013020 works=yes
13021
Guido van Rossum627b2d71993-12-24 10:39:16 +000013022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13025$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013026
Martin v. Löwisd6320502004-08-12 13:45:08 +000013027# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13029$as_echo_n "checking for socketpair... " >&6; }
13030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013031/* end confdefs.h. */
13032
13033#include <sys/types.h>
13034#include <sys/socket.h>
13035
13036int
13037main ()
13038{
13039void *x=socketpair
13040 ;
13041 return 0;
13042}
13043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013047
Matthias Kloseb159a552010-04-25 21:00:44 +000013048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013049$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013050else
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13052$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013053
13054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013056
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013057# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13059$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013062#include <sys/types.h>
13063#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013064int
13065main ()
13066{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013067struct sockaddr x;
13068x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ;
13070 return 0;
13071}
13072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013073if ac_fn_c_try_compile "$LINENO"; then :
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13075$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013078
13079else
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13081$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013082
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013085
Guido van Rossumda88dad1995-01-26 00:46:29 +000013086va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13088$as_echo_n "checking whether va_list is an array... " >&6; }
13089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013090/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013091
13092#ifdef HAVE_STDARG_PROTOTYPES
13093#include <stdarg.h>
13094#else
13095#include <varargs.h>
13096#endif
13097
Martin v. Löwis11437992002-04-12 09:54:03 +000013098int
13099main ()
13100{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013101va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ;
13103 return 0;
13104}
13105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013106if ac_fn_c_try_compile "$LINENO"; then :
13107
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108else
Skip Montanaro6dead952003-09-25 14:50:04 +000013109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013112
Guido van Rossumda88dad1995-01-26 00:46:29 +000013113 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013114
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13118$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013120# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013121
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013124if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013125
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13129$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013130 OLD_CFLAGS=$CFLAGS
13131 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013133/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013134
13135# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013136
Martin v. Löwis11437992002-04-12 09:54:03 +000013137int
13138main ()
13139{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013140
13141 char *name;
13142 struct hostent *he, *res;
13143 char buffer[2048];
13144 int buflen = 2048;
13145 int h_errnop;
13146
13147 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
13149 ;
13150 return 0;
13151}
13152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013159
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13161$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013162
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013163else
Skip Montanaro6dead952003-09-25 14:50:04 +000013164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13166$as_echo "no" >&6; }
13167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13168$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013170/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013171
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013172# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013173
Martin v. Löwis11437992002-04-12 09:54:03 +000013174int
13175main ()
13176{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013177
13178 char *name;
13179 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013180 char buffer[2048];
13181 int buflen = 2048;
13182 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013183
Matthias Kloseb159a552010-04-25 21:00:44 +000013184 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
13186 ;
13187 return 0;
13188}
13189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013193
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
Matthias Kloseb159a552010-04-25 21:00:44 +000013195$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013196
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13198$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013199
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013200else
Skip Montanaro6dead952003-09-25 14:50:04 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13203$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13205$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207/* end confdefs.h. */
13208
13209# include <netdb.h>
13210
13211int
13212main ()
13213{
13214
13215 char *name;
13216 struct hostent *he;
13217 struct hostent_data data;
13218
13219 (void) gethostbyname_r(name, he, &data);
13220
13221 ;
13222 return 0;
13223}
13224_ACEOF
13225if ac_fn_c_try_compile "$LINENO"; then :
13226
13227 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13228
13229
13230$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13231
13232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13233$as_echo "yes" >&6; }
13234
13235else
13236
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13238$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013242
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013248 CFLAGS=$OLD_CFLAGS
13249
13250else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 for ac_func in gethostbyname
13253do :
13254 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013255if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013256 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013257#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013258_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013259
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013260fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013261done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013262
Michael W. Hudson54241132001-12-07 15:38:26 +000013263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013264fi
13265
Michael W. Hudson54241132001-12-07 15:38:26 +000013266
13267
13268
13269
13270
13271
Guido van Rossum627b2d71993-12-24 10:39:16 +000013272# checks for system services
13273# (none yet)
13274
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013275# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013276ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013277if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013278
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013279else
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13281$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013282if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013284else
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013286LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290/* Override any GCC internal prototype to avoid an error.
13291 Use char because int might match the return type of a GCC
13292 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013293#ifdef __cplusplus
13294extern "C"
13295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013296char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013297int
13298main ()
13299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013300return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 ;
13302 return 0;
13303}
13304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013310rm -f core conftest.err conftest.$ac_objext \
13311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013312LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13315$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013316if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 cat >>confdefs.h <<_ACEOF
13318#define HAVE_LIBIEEE 1
13319_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013321 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322
Guido van Rossum627b2d71993-12-24 10:39:16 +000013323fi
13324
Michael W. Hudson54241132001-12-07 15:38:26 +000013325
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013326fi
13327
Michael W. Hudson54241132001-12-07 15:38:26 +000013328
Guido van Rossum7f253911997-05-09 02:42:48 +000013329# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13331$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013336if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013337then
13338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13342$as_echo "yes" >&6; }
13343else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13344$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013345fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13348$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349fi
13350
Guido van Rossum7f253911997-05-09 02:42:48 +000013351
Guido van Rossum7f43da71994-08-01 12:15:30 +000013352# check for --with-libm=...
13353
Guido van Rossum563e7081996-09-10 18:20:48 +000013354case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013355Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013356*) LIBM=-lm
13357esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13359$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013362if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013363 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013364if test "$withval" = no
13365then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13367$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013368elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013369then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13371$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013372else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013373fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013374else
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13376$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377fi
13378
Guido van Rossum7f43da71994-08-01 12:15:30 +000013379
13380# check for --with-libc=...
13381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13383$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013386if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013388if test "$withval" = no
13389then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13391$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013392elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013393then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13395$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013396else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013397fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13400$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013401fi
13402
Guido van Rossum7f43da71994-08-01 12:15:30 +000013403
Stefan Krah1919b7e2012-03-21 18:25:23 +010013404# **************************************
13405# * Check for gcc x64 inline assembler *
13406# **************************************
13407
13408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13409$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13411/* end confdefs.h. */
13412
13413int
13414main ()
13415{
13416
13417 __asm__ __volatile__ ("movq %rcx, %rax");
13418
13419 ;
13420 return 0;
13421}
13422_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013423if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013424 have_gcc_asm_for_x64=yes
13425else
13426 have_gcc_asm_for_x64=no
13427fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013428rm -f core conftest.err conftest.$ac_objext \
13429 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13431$as_echo "$have_gcc_asm_for_x64" >&6; }
13432if test "$have_gcc_asm_for_x64" = yes
13433then
13434
13435$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13436
13437fi
13438
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013439# **************************************************
13440# * Check for various properties of floating point *
13441# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13444$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013445if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013447else
13448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013450 ac_cv_little_endian_double=no
13451else
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013453/* end confdefs.h. */
13454
13455#include <string.h>
13456int main() {
13457 double x = 9006104071832581.0;
13458 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13459 return 0;
13460 else
13461 return 1;
13462}
13463
13464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013465if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013466 ac_cv_little_endian_double=yes
13467else
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13471 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013472fi
13473
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013474fi
13475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13477$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013478if test "$ac_cv_little_endian_double" = yes
13479then
13480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013482
13483fi
13484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13486$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013487if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013489else
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013492 ac_cv_big_endian_double=no
13493else
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013495/* end confdefs.h. */
13496
13497#include <string.h>
13498int main() {
13499 double x = 9006104071832581.0;
13500 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13501 return 0;
13502 else
13503 return 1;
13504}
13505
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013508 ac_cv_big_endian_double=yes
13509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013514fi
13515
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013516fi
13517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13519$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013520if test "$ac_cv_big_endian_double" = yes
13521then
13522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013524
13525fi
13526
13527# Some ARM platforms use a mixed-endian representation for doubles.
13528# While Python doesn't currently have full support for these platforms
13529# (see e.g., issue 1762561), we can at least make sure that float <-> string
13530# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13532$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013533if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013535else
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013538 ac_cv_mixed_endian_double=no
13539else
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013541/* end confdefs.h. */
13542
13543#include <string.h>
13544int main() {
13545 double x = 9006104071832581.0;
13546 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13547 return 0;
13548 else
13549 return 1;
13550}
13551
13552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013553if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013554 ac_cv_mixed_endian_double=yes
13555else
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013560fi
13561
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013562fi
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13565$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013566if test "$ac_cv_mixed_endian_double" = yes
13567then
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013570
13571fi
13572
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013573# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013574# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013575# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013576# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013577# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013578# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013579
13580# This inline assembler syntax may also work for suncc and icc,
13581# so we try it on all platforms.
13582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13584$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013586/* end confdefs.h. */
13587
13588int
13589main ()
13590{
13591
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013592 unsigned short cw;
13593 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13594 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013595
13596 ;
13597 return 0;
13598}
13599_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013600if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013601 have_gcc_asm_for_x87=yes
13602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013604fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013605rm -f core conftest.err conftest.$ac_objext \
13606 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13608$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013609if test "$have_gcc_asm_for_x87" = yes
13610then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013613
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013614fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13617$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13619/* end confdefs.h. */
13620
13621int
13622main ()
13623{
13624
13625 unsigned int fpcr;
13626 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13627 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13628
13629 ;
13630 return 0;
13631}
13632_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013633if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013634 have_gcc_asm_for_mc68881=yes
13635else
13636 have_gcc_asm_for_mc68881=no
13637fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013638rm -f core conftest.err conftest.$ac_objext \
13639 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13641$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13642if test "$have_gcc_asm_for_mc68881" = yes
13643then
13644
13645$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13646
13647fi
13648
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013649# Detect whether system arithmetic is subject to x87-style double
13650# rounding issues. The result of this test has little meaning on non
13651# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13652# mode is round-to-nearest and double rounding issues are present, and
13653# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13655$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013656# $BASECFLAGS may affect the result
13657ac_save_cc="$CC"
13658CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013659if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013660 ac_cv_x87_double_rounding=no
13661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013663/* end confdefs.h. */
13664
13665#include <stdlib.h>
13666#include <math.h>
13667int main() {
13668 volatile double x, y, z;
13669 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13670 x = 0.99999999999999989; /* 1-2**-53 */
13671 y = 1./x;
13672 if (y != 1.)
13673 exit(0);
13674 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13675 x = 1e16;
13676 y = 2.99999;
13677 z = x + y;
13678 if (z != 1e16+4.)
13679 exit(0);
13680 /* both tests show evidence of double rounding */
13681 exit(1);
13682}
13683
13684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013685if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013686 ac_cv_x87_double_rounding=no
13687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13691 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013692fi
13693
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013694CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13696$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013697if test "$ac_cv_x87_double_rounding" = yes
13698then
13699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013701
13702fi
13703
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013704# ************************************
13705# * Check for mathematical functions *
13706# ************************************
13707
13708LIBS_SAVE=$LIBS
13709LIBS="$LIBS $LIBM"
13710
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013711for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13712do :
13713 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13714ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013715if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013716 cat >>confdefs.h <<_ACEOF
13717#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13718_ACEOF
13719
13720fi
13721done
13722
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013723for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013724do :
13725 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13726ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013727if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013728 cat >>confdefs.h <<_ACEOF
13729#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13730_ACEOF
13731
13732fi
13733done
13734
13735ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13736"
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013738 ac_have_decl=1
13739else
13740 ac_have_decl=0
13741fi
13742
13743cat >>confdefs.h <<_ACEOF
13744#define HAVE_DECL_ISINF $ac_have_decl
13745_ACEOF
13746ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13747"
Victor Stinnere0be4232011-10-25 13:06:09 +020013748if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013749 ac_have_decl=1
13750else
13751 ac_have_decl=0
13752fi
13753
13754cat >>confdefs.h <<_ACEOF
13755#define HAVE_DECL_ISNAN $ac_have_decl
13756_ACEOF
13757ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13758"
Victor Stinnere0be4232011-10-25 13:06:09 +020013759if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013760 ac_have_decl=1
13761else
13762 ac_have_decl=0
13763fi
13764
13765cat >>confdefs.h <<_ACEOF
13766#define HAVE_DECL_ISFINITE $ac_have_decl
13767_ACEOF
13768
13769
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013770# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13771# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13773$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013776else
13777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013779 ac_cv_tanh_preserves_zero_sign=no
13780else
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013782/* end confdefs.h. */
13783
13784#include <math.h>
13785#include <stdlib.h>
13786int main() {
13787 /* return 0 if either negative zeros don't exist
13788 on this platform or if negative zeros exist
13789 and tanh(-0.) == -0. */
13790 if (atan2(0., -1.) == atan2(-0., -1.) ||
13791 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13792 else exit(1);
13793}
13794
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013797 ac_cv_tanh_preserves_zero_sign=yes
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013803fi
13804
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013805fi
13806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13808$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013809if test "$ac_cv_tanh_preserves_zero_sign" = yes
13810then
13811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013813
13814fi
13815
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013816if test "$ac_cv_func_log1p" = yes
13817then
13818 # On some versions of AIX, log1p(-0.) returns 0. instead of
13819 # -0. See issue #9920.
13820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13821$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013822 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013823 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013824else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013825
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013826 if test "$cross_compiling" = yes; then :
13827 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013828else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13830/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013831
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013832 #include <math.h>
13833 #include <stdlib.h>
13834 int main() {
13835 /* Fail if the signs of log1p(-0.) and -0. can be
13836 distinguished. */
13837 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13838 return 0;
13839 else
13840 return 1;
13841 }
13842
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013843_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013844if ac_fn_c_try_run "$LINENO"; then :
13845 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013846else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013847 ac_cv_log1p_drops_zero_sign=yes
13848fi
13849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013851fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013852
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013853fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013854
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13856$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13857fi
13858if test "$ac_cv_log1p_drops_zero_sign" = yes
13859then
13860
13861$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13862
13863fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013864
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013865LIBS=$LIBS_SAVE
13866
Mark Dickinsona614f042009-11-28 12:48:43 +000013867# For multiprocessing module, check that sem_open
13868# actually works. For FreeBSD versions <= 7.2,
13869# the kernel module that provides POSIX semaphores
13870# isn't loaded by default, so an attempt to call
13871# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13873$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013874if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013876else
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013878 ac_cv_posix_semaphores_enabled=yes
13879else
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013881/* end confdefs.h. */
13882
13883#include <unistd.h>
13884#include <fcntl.h>
13885#include <stdio.h>
13886#include <semaphore.h>
13887#include <sys/stat.h>
13888
13889int main(void) {
13890 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13891 if (a == SEM_FAILED) {
13892 perror("sem_open");
13893 return 1;
13894 }
13895 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013896 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013897 return 0;
13898}
13899
13900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013902 ac_cv_posix_semaphores_enabled=yes
13903else
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013908fi
13909
13910
Mark Dickinsona614f042009-11-28 12:48:43 +000013911fi
13912
Matthias Kloseb9621712010-04-24 17:59:49 +000013913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13914$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013915if test $ac_cv_posix_semaphores_enabled = no
13916then
13917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013919
13920fi
13921
Mark Dickinson10683072009-04-18 21:18:19 +000013922# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13924$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013925if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013929 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013930else
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013932/* end confdefs.h. */
13933
13934#include <unistd.h>
13935#include <fcntl.h>
13936#include <stdio.h>
13937#include <semaphore.h>
13938#include <sys/stat.h>
13939
13940int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013941 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013942 int count;
13943 int res;
13944 if(a==SEM_FAILED){
13945 perror("sem_open");
13946 return 1;
13947
13948 }
13949 res = sem_getvalue(a, &count);
13950 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013951 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013952 return res==-1 ? 1 : 0;
13953}
13954
Mark Dickinson10683072009-04-18 21:18:19 +000013955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013957 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013963fi
13964
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013966fi
13967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13969$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013970if test $ac_cv_broken_sem_getvalue = yes
13971then
13972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013974
13975fi
13976
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030013977ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
13978"
13979if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
13980 ac_have_decl=1
13981else
13982 ac_have_decl=0
13983fi
13984
13985cat >>confdefs.h <<_ACEOF
13986#define HAVE_DECL_RTLD_LAZY $ac_have_decl
13987_ACEOF
13988ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
13989"
13990if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
13991 ac_have_decl=1
13992else
13993 ac_have_decl=0
13994fi
13995
13996cat >>confdefs.h <<_ACEOF
13997#define HAVE_DECL_RTLD_NOW $ac_have_decl
13998_ACEOF
13999ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14000"
14001if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14002 ac_have_decl=1
14003else
14004 ac_have_decl=0
14005fi
14006
14007cat >>confdefs.h <<_ACEOF
14008#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14009_ACEOF
14010ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14011"
14012if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14013 ac_have_decl=1
14014else
14015 ac_have_decl=0
14016fi
14017
14018cat >>confdefs.h <<_ACEOF
14019#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14020_ACEOF
14021ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14022"
14023if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14024 ac_have_decl=1
14025else
14026 ac_have_decl=0
14027fi
14028
14029cat >>confdefs.h <<_ACEOF
14030#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14031_ACEOF
14032ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14033"
14034if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14035 ac_have_decl=1
14036else
14037 ac_have_decl=0
14038fi
14039
14040cat >>confdefs.h <<_ACEOF
14041#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14042_ACEOF
14043ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14044"
14045if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14046 ac_have_decl=1
14047else
14048 ac_have_decl=0
14049fi
14050
14051cat >>confdefs.h <<_ACEOF
14052#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14053_ACEOF
14054
14055
Mark Dickinsonbd792642009-03-18 20:06:12 +000014056# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14058$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014059# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014060if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014061 enableval=$enable_big_digits; case $enable_big_digits in
14062yes)
14063 enable_big_digits=30 ;;
14064no)
14065 enable_big_digits=15 ;;
1406615|30)
14067 ;;
14068*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014069 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 +000014070esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14072$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014073
14074cat >>confdefs.h <<_ACEOF
14075#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14076_ACEOF
14077
14078
14079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14081$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014082fi
14083
14084
Guido van Rossumef2255b2000-03-10 22:30:29 +000014085# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014086ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014087if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014088
14089
Matthias Kloseb9621712010-04-24 17:59:49 +000014090$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014091
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014092 wchar_h="yes"
14093
Guido van Rossumef2255b2000-03-10 22:30:29 +000014094else
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014096
14097fi
14098
Michael W. Hudson54241132001-12-07 15:38:26 +000014099
Martin v. Löwis11437992002-04-12 09:54:03 +000014100
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014101# determine wchar_t size
14102if test "$wchar_h" = yes
14103then
Matthias Kloseb9621712010-04-24 17:59:49 +000014104 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014105# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14106# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14107# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14109$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014110if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014112else
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14114"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116else
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 if test "$ac_cv_type_wchar_t" = yes; then
14118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014120as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014121See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122 else
14123 ac_cv_sizeof_wchar_t=0
14124 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014126
Martin v. Löwis11437992002-04-12 09:54:03 +000014127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14129$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130
14131
14132
Martin v. Löwis11437992002-04-12 09:54:03 +000014133cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014134#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014135_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014136
Michael W. Hudson54241132001-12-07 15:38:26 +000014137
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014138fi
14139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14141$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014142have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014144/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014145
14146#include <tcl.h>
14147#if TCL_UTF_MAX != 6
14148# error "NOT UCS4_TCL"
14149#endif
14150int
14151main ()
14152{
14153
14154 ;
14155 return 0;
14156}
14157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014159
14160
Matthias Kloseb9621712010-04-24 17:59:49 +000014161$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014162
14163 have_ucs4_tcl=yes
14164
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14168$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014169
Skip Montanaro6dead952003-09-25 14:50:04 +000014170# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014171if test "$wchar_h" = yes
14172then
14173 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14175$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014176 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014178else
14179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014181 ac_cv_wchar_t_signed=yes
14182else
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014184/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014185
14186 #include <wchar.h>
14187 int main()
14188 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014189 /* Success: exit code 0 */
14190 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014191 }
14192
14193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014194if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014195 ac_cv_wchar_t_signed=yes
14196else
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14200 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014201fi
14202
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014203fi
14204
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14206$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207fi
14208
Georg Brandl52d168a2008-01-07 18:10:24 +000014209# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014210if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014211 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014212then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014213 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014216
Georg Brandl52d168a2008-01-07 18:10:24 +000014217else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014218 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014219fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14221$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014222
14223# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14225$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014226if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014228else
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 ac_cv_c_bigendian=unknown
14230 # See if we're dealing with a universal compiler.
14231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14232/* end confdefs.h. */
14233#ifndef __APPLE_CC__
14234 not a universal capable compiler
14235 #endif
14236 typedef int dummy;
14237
Skip Montanaro6dead952003-09-25 14:50:04 +000014238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014239if ac_fn_c_try_compile "$LINENO"; then :
14240
14241 # Check for potential -arch flags. It is not universal unless
14242 # there are at least two -arch flags with different values.
14243 ac_arch=
14244 ac_prev=
14245 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14246 if test -n "$ac_prev"; then
14247 case $ac_word in
14248 i?86 | x86_64 | ppc | ppc64)
14249 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14250 ac_arch=$ac_word
14251 else
14252 ac_cv_c_bigendian=universal
14253 break
14254 fi
14255 ;;
14256 esac
14257 ac_prev=
14258 elif test "x$ac_word" = "x-arch"; then
14259 ac_prev=arch
14260 fi
14261 done
14262fi
14263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14264 if test $ac_cv_c_bigendian = unknown; then
14265 # See if sys/param.h defines the BYTE_ORDER macro.
14266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014267/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014268#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014270
Martin v. Löwis11437992002-04-12 09:54:03 +000014271int
14272main ()
14273{
Matthias Kloseb9621712010-04-24 17:59:49 +000014274#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14275 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14276 && LITTLE_ENDIAN)
14277 bogus endian macros
14278 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014279
14280 ;
14281 return 0;
14282}
14283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014285 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014287/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014288#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014290
Martin v. Löwis11437992002-04-12 09:54:03 +000014291int
14292main ()
14293{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014294#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 not big endian
14296 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
14298 ;
14299 return 0;
14300}
14301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014302if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014303 ac_cv_c_bigendian=yes
14304else
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014308fi
14309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14310 fi
14311 if test $ac_cv_c_bigendian = unknown; then
14312 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014314/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014315#include <limits.h>
14316
Martin v. Löwis11437992002-04-12 09:54:03 +000014317int
14318main ()
14319{
Matthias Kloseb9621712010-04-24 17:59:49 +000014320#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14321 bogus endian macros
14322 #endif
14323
Martin v. Löwis11437992002-04-12 09:54:03 +000014324 ;
14325 return 0;
14326}
14327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014328if ac_fn_c_try_compile "$LINENO"; then :
14329 # It does; now see whether it defined to _BIG_ENDIAN or not.
14330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14331/* end confdefs.h. */
14332#include <limits.h>
14333
14334int
14335main ()
14336{
14337#ifndef _BIG_ENDIAN
14338 not big endian
14339 #endif
14340
14341 ;
14342 return 0;
14343}
14344_ACEOF
14345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014347else
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14351fi
14352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14353 fi
14354 if test $ac_cv_c_bigendian = unknown; then
14355 # Compile a test program.
14356 if test "$cross_compiling" = yes; then :
14357 # Try to guess by grepping values from an object file.
14358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14359/* end confdefs.h. */
14360short int ascii_mm[] =
14361 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14362 short int ascii_ii[] =
14363 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14364 int use_ascii (int i) {
14365 return ascii_mm[i] + ascii_ii[i];
14366 }
14367 short int ebcdic_ii[] =
14368 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14369 short int ebcdic_mm[] =
14370 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14371 int use_ebcdic (int i) {
14372 return ebcdic_mm[i] + ebcdic_ii[i];
14373 }
14374 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375
Matthias Kloseb9621712010-04-24 17:59:49 +000014376int
14377main ()
14378{
14379return use_ascii (foo) == use_ebcdic (foo);
14380 ;
14381 return 0;
14382}
14383_ACEOF
14384if ac_fn_c_try_compile "$LINENO"; then :
14385 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14386 ac_cv_c_bigendian=yes
14387 fi
14388 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14389 if test "$ac_cv_c_bigendian" = unknown; then
14390 ac_cv_c_bigendian=no
14391 else
14392 # finding both strings is unlikely to happen, but who knows?
14393 ac_cv_c_bigendian=unknown
14394 fi
14395 fi
14396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014398else
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014400/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014401$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014402int
14403main ()
14404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 /* Are we little or big endian? From Harbison&Steele. */
14407 union
14408 {
14409 long int l;
14410 char c[sizeof (long int)];
14411 } u;
14412 u.l = 1;
14413 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414
14415 ;
14416 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014417}
Martin v. Löwis11437992002-04-12 09:54:03 +000014418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014419if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014420 ac_cv_c_bigendian=no
14421else
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14431$as_echo "$ac_cv_c_bigendian" >&6; }
14432 case $ac_cv_c_bigendian in #(
14433 yes)
14434 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14435;; #(
14436 no)
14437 ;; #(
14438 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 ;; #(
14443 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014444 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014445 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014447
Michael W. Hudson54241132001-12-07 15:38:26 +000014448
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014449# ABI version string for Python extension modules. This appears between the
14450# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14451# from the following attributes which affect the ABI of this Python build (in
14452# this order):
14453#
14454# * The Python implementation (always 'cpython-' for us)
14455# * The major and minor version numbers
14456# * --with-pydebug (adds a 'd')
14457# * --with-pymalloc (adds a 'm')
14458# * --with-wide-unicode (adds a 'u')
14459#
14460# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014461# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14462# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014463
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14465$as_echo_n "checking ABIFLAGS... " >&6; }
14466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14467$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14469$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014470SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14472$as_echo "$SOABI" >&6; }
14473
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014474
14475case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014476 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014477 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14478 *)
14479 EXT_SUFFIX=${SHLIB_SUFFIX};;
14480esac
14481
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14483$as_echo_n "checking LDVERSION... " >&6; }
14484LDVERSION='$(VERSION)$(ABIFLAGS)'
14485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14486$as_echo "$LDVERSION" >&6; }
14487
doko@python.org87421192013-01-26 11:39:31 +010014488
doko@ubuntu.com55532312016-06-14 08:55:19 +020014489if test x$PLATFORM_TRIPLET = x; then
14490 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14491else
14492 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14493fi
doko@python.org87421192013-01-26 11:39:31 +010014494
14495
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014496# Check whether right shifting a negative integer extends the sign bit
14497# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14499$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014500if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014502else
Martin v. Löwis11437992002-04-12 09:54:03 +000014503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014505 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014508/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014509
14510int main()
14511{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014512 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014513}
14514
Martin v. Löwis11437992002-04-12 09:54:03 +000014515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014516if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014517 ac_cv_rshift_extends_sign=yes
14518else
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14522 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014523fi
14524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525fi
14526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14528$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014529if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014530then
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014533
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014534fi
14535
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014536# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14538$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014539if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014541else
Martin v. Löwis11437992002-04-12 09:54:03 +000014542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014544/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014545#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014546int
14547main ()
14548{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014549
14550 FILE *f = fopen("/dev/null", "r");
14551 flockfile(f);
14552 getc_unlocked(f);
14553 funlockfile(f);
14554
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 ;
14556 return 0;
14557}
14558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014559if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014560 ac_cv_have_getc_unlocked=yes
14561else
Matthias Kloseb9621712010-04-24 17:59:49 +000014562 ac_cv_have_getc_unlocked=no
14563fi
14564rm -f core conftest.err conftest.$ac_objext \
14565 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567
Matthias Kloseb9621712010-04-24 17:59:49 +000014568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14569$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014570if test "$ac_cv_have_getc_unlocked" = yes
14571then
Martin v. Löwis11437992002-04-12 09:54:03 +000014572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014574
14575fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014576
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014577# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014578# save the value of LIBS so we don't actually link Python with readline
14579LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014580
Gregory P. Smith18820942008-09-07 06:24:49 +000014581# On some systems we need to link readline to a termcap compatible
14582# library. NOTE: Keep the precedence of listed libraries synchronised
14583# with setup.py.
14584py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14586$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014587for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014588 if test -z "$py_libtermcap"; then
14589 READLINE_LIBS="-lreadline"
14590 else
14591 READLINE_LIBS="-lreadline -l$py_libtermcap"
14592 fi
14593 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014595/* end confdefs.h. */
14596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597/* Override any GCC internal prototype to avoid an error.
14598 Use char because int might match the return type of a GCC
14599 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014600#ifdef __cplusplus
14601extern "C"
14602#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014603char readline ();
14604int
14605main ()
14606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014608 ;
14609 return 0;
14610}
14611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014612if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014613 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014615rm -f core conftest.err conftest.$ac_objext \
14616 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014617 if test $py_cv_lib_readline = yes; then
14618 break
14619 fi
14620done
14621# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14622#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014623if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14625$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014626else
Matthias Kloseb9621712010-04-24 17:59:49 +000014627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14628$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014631
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014632fi
14633
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014634# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14636$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014637if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014639else
14640 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014641LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014643/* end confdefs.h. */
14644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645/* Override any GCC internal prototype to avoid an error.
14646 Use char because int might match the return type of a GCC
14647 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014648#ifdef __cplusplus
14649extern "C"
14650#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014651char rl_callback_handler_install ();
14652int
14653main ()
14654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014656 ;
14657 return 0;
14658}
14659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014660if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014661 ac_cv_lib_readline_rl_callback_handler_install=yes
14662else
Matthias Kloseb9621712010-04-24 17:59:49 +000014663 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014665rm -f core conftest.err conftest.$ac_objext \
14666 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014667LIBS=$ac_check_lib_save_LIBS
14668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14670$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014671if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014674
14675fi
14676
14677
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014678# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014680/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014681#include <readline/readline.h>
14682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014684 have_readline=yes
14685else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014686 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014687
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014688fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014689rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014690if test $have_readline = yes
14691then
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014693/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014694#include <readline/readline.h>
14695
14696_ACEOF
14697if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014698 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014701
14702fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014703rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014706/* end confdefs.h. */
14707#include <readline/readline.h>
14708
14709_ACEOF
14710if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014712
Matthias Kloseb9621712010-04-24 17:59:49 +000014713$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014714
14715fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014716rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014717
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014718fi
14719
Martin v. Löwis0daad592001-09-30 21:09:59 +000014720# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14722$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014723if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014725else
Martin v. Löwis11437992002-04-12 09:54:03 +000014726 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014727LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731/* Override any GCC internal prototype to avoid an error.
14732 Use char because int might match the return type of a GCC
14733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014734#ifdef __cplusplus
14735extern "C"
14736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014737char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014738int
14739main ()
14740{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014741return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014742 ;
14743 return 0;
14744}
14745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014746if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014747 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014748else
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014751rm -f core conftest.err conftest.$ac_objext \
14752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014753LIBS=$ac_check_lib_save_LIBS
14754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14756$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014757if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014758
Matthias Kloseb9621712010-04-24 17:59:49 +000014759$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014760
Martin v. Löwis0daad592001-09-30 21:09:59 +000014761fi
14762
Michael W. Hudson54241132001-12-07 15:38:26 +000014763
Thomas Wouters89d996e2007-09-08 17:39:28 +000014764# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14766$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014767if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014769else
14770 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014771LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014773/* end confdefs.h. */
14774
14775/* Override any GCC internal prototype to avoid an error.
14776 Use char because int might match the return type of a GCC
14777 builtin and then its argument prototype would still apply. */
14778#ifdef __cplusplus
14779extern "C"
14780#endif
14781char rl_completion_display_matches_hook ();
14782int
14783main ()
14784{
14785return rl_completion_display_matches_hook ();
14786 ;
14787 return 0;
14788}
14789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014790if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014791 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014795rm -f core conftest.err conftest.$ac_objext \
14796 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014797LIBS=$ac_check_lib_save_LIBS
14798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14800$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014801if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014802
Matthias Kloseb9621712010-04-24 17:59:49 +000014803$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014804
14805fi
14806
14807
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014808# also in 4.0, but not in editline
14809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14810$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14811if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14812 $as_echo_n "(cached) " >&6
14813else
14814 ac_check_lib_save_LIBS=$LIBS
14815LIBS="-lreadline $READLINE_LIBS $LIBS"
14816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14817/* end confdefs.h. */
14818
14819/* Override any GCC internal prototype to avoid an error.
14820 Use char because int might match the return type of a GCC
14821 builtin and then its argument prototype would still apply. */
14822#ifdef __cplusplus
14823extern "C"
14824#endif
14825char rl_resize_terminal ();
14826int
14827main ()
14828{
14829return rl_resize_terminal ();
14830 ;
14831 return 0;
14832}
14833_ACEOF
14834if ac_fn_c_try_link "$LINENO"; then :
14835 ac_cv_lib_readline_rl_resize_terminal=yes
14836else
14837 ac_cv_lib_readline_rl_resize_terminal=no
14838fi
14839rm -f core conftest.err conftest.$ac_objext \
14840 conftest$ac_exeext conftest.$ac_ext
14841LIBS=$ac_check_lib_save_LIBS
14842fi
14843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14844$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14845if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14846
14847$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14848
14849fi
14850
14851
Martin v. Löwis0daad592001-09-30 21:09:59 +000014852# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14854$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014855if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014857else
Martin v. Löwis11437992002-04-12 09:54:03 +000014858 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014859LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863/* Override any GCC internal prototype to avoid an error.
14864 Use char because int might match the return type of a GCC
14865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014866#ifdef __cplusplus
14867extern "C"
14868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014869char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014870int
14871main ()
14872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 ;
14875 return 0;
14876}
14877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014880else
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014883rm -f core conftest.err conftest.$ac_objext \
14884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014885LIBS=$ac_check_lib_save_LIBS
14886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14888$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014889if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014890
Matthias Kloseb9621712010-04-24 17:59:49 +000014891$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014892
Guido van Rossum353ae582001-07-10 16:45:32 +000014893fi
14894
Jack Jansendd19cf82001-12-06 22:36:17 +000014895
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014896# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014898/* end confdefs.h. */
14899#include <readline/readline.h>
14900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014901if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014902 have_readline=yes
14903else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014904 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014905
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014906fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014907rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014908if test $have_readline = yes
14909then
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014911/* end confdefs.h. */
14912#include <readline/readline.h>
14913
14914_ACEOF
14915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014919
14920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014921rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014922
14923fi
14924
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14926$as_echo_n "checking for append_history in -lreadline... " >&6; }
14927if ${ac_cv_lib_readline_append_history+:} false; then :
14928 $as_echo_n "(cached) " >&6
14929else
14930 ac_check_lib_save_LIBS=$LIBS
14931LIBS="-lreadline $READLINE_LIBS $LIBS"
14932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14933/* end confdefs.h. */
14934
14935/* Override any GCC internal prototype to avoid an error.
14936 Use char because int might match the return type of a GCC
14937 builtin and then its argument prototype would still apply. */
14938#ifdef __cplusplus
14939extern "C"
14940#endif
14941char append_history ();
14942int
14943main ()
14944{
14945return append_history ();
14946 ;
14947 return 0;
14948}
14949_ACEOF
14950if ac_fn_c_try_link "$LINENO"; then :
14951 ac_cv_lib_readline_append_history=yes
14952else
14953 ac_cv_lib_readline_append_history=no
14954fi
14955rm -f core conftest.err conftest.$ac_objext \
14956 conftest$ac_exeext conftest.$ac_ext
14957LIBS=$ac_check_lib_save_LIBS
14958fi
14959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14960$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14961if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14962
14963$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14964
14965fi
14966
14967
Martin v. Löwis82bca632006-02-10 20:49:30 +000014968# End of readline checks: restore LIBS
14969LIBS=$LIBS_no_readline
14970
Matthias Kloseb9621712010-04-24 17:59:49 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14972$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014973if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014975else
Martin v. Löwis11437992002-04-12 09:54:03 +000014976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014978 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014979else
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014981/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014982
14983int main()
14984{
14985 int val1 = nice(1);
14986 if (val1 != -1 && val1 == nice(2))
14987 exit(0);
14988 exit(1);
14989}
14990
Martin v. Löwis11437992002-04-12 09:54:03 +000014991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014992if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014993 ac_cv_broken_nice=yes
14994else
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014999fi
15000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001fi
15002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15004$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015005if test "$ac_cv_broken_nice" = yes
15006then
Martin v. Löwis11437992002-04-12 09:54:03 +000015007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015009
15010fi
15011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15013$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015014if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015015 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015016else
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015018 ac_cv_broken_poll=no
15019else
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015021/* end confdefs.h. */
15022
15023#include <poll.h>
15024
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015025int main()
15026{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015027 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015028 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015029
15030 close (42);
15031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015032 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015033 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015034 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015035 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015036 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015037 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015038 return 1;
15039}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015040
15041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015042if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015043 ac_cv_broken_poll=yes
15044else
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015051fi
15052
Matthias Kloseb9621712010-04-24 17:59:49 +000015053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15054$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015055if test "$ac_cv_broken_poll" = yes
15056then
15057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015059
15060fi
15061
Brett Cannon43802422005-02-10 20:48:03 +000015062# 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 +000015063# (which is not required by ISO C or UNIX spec) and/or if we support
15064# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015065ac_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 +000015066#include <$ac_cv_struct_tm>
15067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068"
Victor Stinnere0be4232011-10-25 13:06:09 +020015069if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015070
15071cat >>confdefs.h <<_ACEOF
15072#define HAVE_STRUCT_TM_TM_ZONE 1
15073_ACEOF
15074
15075
15076fi
15077
15078if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015081
15082else
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15084"
Victor Stinnere0be4232011-10-25 13:06:09 +020015085if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087else
Matthias Kloseb9621712010-04-24 17:59:49 +000015088 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089fi
15090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015091cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015092#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093_ACEOF
15094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15096$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015097if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099else
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015101/* end confdefs.h. */
15102#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103#if !HAVE_DECL_TZNAME
15104extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015105#endif
15106
15107int
15108main ()
15109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015111 ;
15112 return 0;
15113}
15114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015115if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015116 ac_cv_var_tzname=yes
15117else
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015120rm -f core conftest.err conftest.$ac_objext \
15121 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15124$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015125 if test $ac_cv_var_tzname = yes; then
15126
Matthias Kloseb9621712010-04-24 17:59:49 +000015127$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015128
15129 fi
15130fi
15131
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015132
Martin v. Löwis1d459062005-03-14 21:23:33 +000015133# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15135$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015136if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015138else
15139
Matthias Kloseb9621712010-04-24 17:59:49 +000015140if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015141 ac_cv_working_tzset=no
15142else
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015144/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015145
15146#include <stdlib.h>
15147#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015148#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015149
15150#if HAVE_TZNAME
15151extern char *tzname[];
15152#endif
15153
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015154int main()
15155{
Brett Cannon18367812003-09-19 00:59:16 +000015156 /* Note that we need to ensure that not only does tzset(3)
15157 do 'something' with localtime, but it works as documented
15158 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015159 This includes making sure that tzname is set properly if
15160 tm->tm_zone does not exist since it is the alternative way
15161 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015162
15163 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015164 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015165 */
15166
Martin v. Löwis1d459062005-03-14 21:23:33 +000015167 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015168 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15169
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015170 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015171 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015172 if (localtime(&groundhogday)->tm_hour != 0)
15173 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015174#if HAVE_TZNAME
15175 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15176 if (strcmp(tzname[0], "UTC") ||
15177 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15178 exit(1);
15179#endif
Brett Cannon18367812003-09-19 00:59:16 +000015180
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015181 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015182 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015183 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015184 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015185#if HAVE_TZNAME
15186 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15187 exit(1);
15188#endif
Brett Cannon18367812003-09-19 00:59:16 +000015189
15190 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15191 tzset();
15192 if (localtime(&groundhogday)->tm_hour != 11)
15193 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015194#if HAVE_TZNAME
15195 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15196 exit(1);
15197#endif
15198
15199#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015200 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15201 exit(1);
15202 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15203 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015204#endif
Brett Cannon18367812003-09-19 00:59:16 +000015205
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015206 exit(0);
15207}
15208
15209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015210if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015211 ac_cv_working_tzset=yes
15212else
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015217fi
15218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219fi
15220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15222$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015223if test "$ac_cv_working_tzset" = yes
15224then
15225
Matthias Kloseb9621712010-04-24 17:59:49 +000015226$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015227
15228fi
15229
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015230# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15232$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015233if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015235else
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015237/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015238#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015239int
15240main ()
15241{
15242
15243struct stat st;
15244st.st_mtim.tv_nsec = 1;
15245
15246 ;
15247 return 0;
15248}
15249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015251 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15256fi
15257
Matthias Kloseb9621712010-04-24 17:59:49 +000015258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15259$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015260if test "$ac_cv_stat_tv_nsec" = yes
15261then
15262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015264
15265fi
15266
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015267# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15269$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015270if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015272else
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015274/* end confdefs.h. */
15275#include <sys/stat.h>
15276int
15277main ()
15278{
15279
15280struct stat st;
15281st.st_mtimespec.tv_nsec = 1;
15282
15283 ;
15284 return 0;
15285}
15286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015288 ac_cv_stat_tv_nsec2=yes
15289else
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15293fi
15294
Matthias Kloseb9621712010-04-24 17:59:49 +000015295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15296$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015297if test "$ac_cv_stat_tv_nsec2" = yes
15298then
15299
Matthias Kloseb9621712010-04-24 17:59:49 +000015300$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015301
15302fi
15303
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015304# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015305ac_save_cppflags="$CPPFLAGS"
15306CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015307
15308for ac_header in curses.h ncurses.h
15309do :
15310 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15311ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15312if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15313 cat >>confdefs.h <<_ACEOF
15314#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15315_ACEOF
15316
15317fi
15318
15319done
15320
15321
15322# On Solaris, term.h requires curses.h
15323for ac_header in term.h
15324do :
15325 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15326#ifdef HAVE_CURSES_H
15327#include <curses.h>
15328#endif
15329
15330"
15331if test "x$ac_cv_header_term_h" = xyes; then :
15332 cat >>confdefs.h <<_ACEOF
15333#define HAVE_TERM_H 1
15334_ACEOF
15335
15336fi
15337
15338done
15339
15340
Jack Jansen666b1e72001-10-31 12:11:48 +000015341# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15343$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015344if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015345 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015346else
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015348/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015349#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015350int
15351main ()
15352{
Jack Jansen666b1e72001-10-31 12:11:48 +000015353
15354 int rtn;
15355 rtn = mvwdelch(0,0,0);
15356
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 ;
15358 return 0;
15359}
15360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015361if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015362 ac_cv_mvwdelch_is_expression=yes
15363else
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15367fi
15368
Matthias Kloseb9621712010-04-24 17:59:49 +000015369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15370$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015371
15372if test "$ac_cv_mvwdelch_is_expression" = yes
15373then
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015376
15377fi
15378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15380$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015381if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015383else
Matthias Kloseb9621712010-04-24 17:59:49 +000015384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015385/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015386#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015387int
15388main ()
15389{
Jack Jansen666b1e72001-10-31 12:11:48 +000015390
15391 WINDOW *w;
15392 w->_flags = 0;
15393
Martin v. Löwis11437992002-04-12 09:54:03 +000015394 ;
15395 return 0;
15396}
15397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015398if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015399 ac_cv_window_has_flags=yes
15400else
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15404fi
15405
Matthias Kloseb9621712010-04-24 17:59:49 +000015406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15407$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015408
Jack Jansen666b1e72001-10-31 12:11:48 +000015409
15410if test "$ac_cv_window_has_flags" = yes
15411then
Martin v. Löwis11437992002-04-12 09:54:03 +000015412
Matthias Kloseb9621712010-04-24 17:59:49 +000015413$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015414
15415fi
15416
Matthias Kloseb9621712010-04-24 17:59:49 +000015417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15418$as_echo_n "checking for is_term_resized... " >&6; }
15419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015420/* end confdefs.h. */
15421#include <curses.h>
15422int
15423main ()
15424{
15425void *x=is_term_resized
15426 ;
15427 return 0;
15428}
15429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015430if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015431
Matthias Kloseb9621712010-04-24 17:59:49 +000015432$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015433
Matthias Kloseb159a552010-04-25 21:00:44 +000015434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015435$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015436else
Matthias Kloseb9621712010-04-24 17:59:49 +000015437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15438$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015439
15440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15442
Matthias Kloseb9621712010-04-24 17:59:49 +000015443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15444$as_echo_n "checking for resize_term... " >&6; }
15445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015446/* end confdefs.h. */
15447#include <curses.h>
15448int
15449main ()
15450{
15451void *x=resize_term
15452 ;
15453 return 0;
15454}
15455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015456if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015457
Matthias Kloseb9621712010-04-24 17:59:49 +000015458$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015459
Matthias Kloseb159a552010-04-25 21:00:44 +000015460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015461$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015462else
Matthias Kloseb9621712010-04-24 17:59:49 +000015463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15464$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015465
15466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15468
Matthias Kloseb9621712010-04-24 17:59:49 +000015469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15470$as_echo_n "checking for resizeterm... " >&6; }
15471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015472/* end confdefs.h. */
15473#include <curses.h>
15474int
15475main ()
15476{
15477void *x=resizeterm
15478 ;
15479 return 0;
15480}
15481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015482if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015483
Matthias Kloseb9621712010-04-24 17:59:49 +000015484$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015485
Matthias Kloseb159a552010-04-25 21:00:44 +000015486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015487$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015488else
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15490$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015491
15492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015494# last curses configure check
15495CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15498$as_echo "$as_me: checking for device files" >&6;}
15499
15500if test "x$cross_compiling" = xyes; then
15501 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15503$as_echo_n "checking for /dev/ptmx... " >&6; }
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15505$as_echo "not set" >&6; }
15506 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15507 fi
15508 if test "${ac_cv_file__dev_ptc+set}" != set; then
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15510$as_echo_n "checking for /dev/ptc... " >&6; }
15511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15512$as_echo "not set" >&6; }
15513 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15514 fi
15515fi
15516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15518$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015519if ${ac_cv_file__dev_ptmx+:} false; then :
15520 $as_echo_n "(cached) " >&6
15521else
15522 test "$cross_compiling" = yes &&
15523 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15524if test -r "/dev/ptmx"; then
15525 ac_cv_file__dev_ptmx=yes
15526else
15527 ac_cv_file__dev_ptmx=no
15528fi
15529fi
15530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15531$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15532if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015533
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015534fi
15535
15536if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015537
Matthias Kloseb9621712010-04-24 17:59:49 +000015538$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015539
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15542$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015543if ${ac_cv_file__dev_ptc+:} false; then :
15544 $as_echo_n "(cached) " >&6
15545else
15546 test "$cross_compiling" = yes &&
15547 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15548if test -r "/dev/ptc"; then
15549 ac_cv_file__dev_ptc=yes
15550else
15551 ac_cv_file__dev_ptc=no
15552fi
15553fi
15554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15555$as_echo "$ac_cv_file__dev_ptc" >&6; }
15556if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015557
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015558fi
15559
15560if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015561
Matthias Kloseb9621712010-04-24 17:59:49 +000015562$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015563
Neal Norwitz865400f2003-03-21 01:42:58 +000015564fi
15565
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015567$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015568if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015569 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015570else
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015572 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015573if test x$GCC = xyes; then
15574save_CFLAGS=$CFLAGS
15575CFLAGS="$CFLAGS -Werror -Wformat"
15576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015577/* end confdefs.h. */
15578
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015579#include <stdio.h>
15580#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015581
15582int
15583main ()
15584{
15585
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015586char *buffer;
15587sprintf(buffer, "%lld", (long long)123);
15588sprintf(buffer, "%lld", (long long)-123);
15589sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015590
15591 ;
15592 return 0;
15593}
15594_ACEOF
15595if ac_fn_c_try_compile "$LINENO"; then :
15596 ac_cv_have_long_long_format=yes
15597
15598fi
15599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015600CFLAGS=$save_CFLAGS
15601fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015602else
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015604/* end confdefs.h. */
15605
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015606#include <stdio.h>
15607#include <stddef.h>
15608#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015609
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015610#ifdef HAVE_SYS_TYPES_H
15611#include <sys/types.h>
15612#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015613
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015614int main()
15615{
15616char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015617
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015618if (sprintf(buffer, "%lld", (long long)123) < 0)
15619return 1;
15620if (strcmp(buffer, "123"))
15621return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015622
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015623if (sprintf(buffer, "%lld", (long long)-123) < 0)
15624return 1;
15625if (strcmp(buffer, "-123"))
15626return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015627
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015628if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15629return 1;
15630if (strcmp(buffer, "123"))
15631return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015632
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015633return 0;
15634}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015635
15636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015637if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015638 ac_cv_have_long_long_format=yes
15639else
Matthias Kloseb9621712010-04-24 17:59:49 +000015640 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015644fi
15645
15646
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015647fi
15648
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015650$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015651
Mark Dickinson89d7d412009-12-31 20:50:59 +000015652if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015653then
15654
Matthias Kloseb9621712010-04-24 17:59:49 +000015655$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015656
15657fi
15658
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015659if test $ac_sys_system = Darwin
15660then
15661 LIBS="$LIBS -framework CoreFoundation"
15662fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15665$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015666if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015668else
Matthias Kloseb9621712010-04-24 17:59:49 +000015669 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015670 ac_cv_have_size_t_format="cross -- assuming yes"
15671
Thomas Wouters477c8d52006-05-27 19:21:47 +000015672else
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015674/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015675
Thomas Wouters477c8d52006-05-27 19:21:47 +000015676#include <stdio.h>
15677#include <stddef.h>
15678#include <string.h>
15679
Christian Heimes2c181612007-12-17 20:04:13 +000015680#ifdef HAVE_SYS_TYPES_H
15681#include <sys/types.h>
15682#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015683
15684#ifdef HAVE_SSIZE_T
15685typedef ssize_t Py_ssize_t;
15686#elif SIZEOF_VOID_P == SIZEOF_LONG
15687typedef long Py_ssize_t;
15688#else
15689typedef int Py_ssize_t;
15690#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015691
Christian Heimes2c181612007-12-17 20:04:13 +000015692int main()
15693{
15694 char buffer[256];
15695
Thomas Wouters477c8d52006-05-27 19:21:47 +000015696 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15697 return 1;
15698
Thomas Wouters89f507f2006-12-13 04:49:30 +000015699 if (strcmp(buffer, "123"))
15700 return 1;
15701
15702 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15703 return 1;
15704
15705 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015706 return 1;
15707
15708 return 0;
15709}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015710
Thomas Wouters477c8d52006-05-27 19:21:47 +000015711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015713 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015719fi
15720
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15723$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015724if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015727
15728fi
15729
Matthias Kloseb9621712010-04-24 17:59:49 +000015730ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015731#ifdef HAVE_SYS_TYPES_H
15732#include <sys/types.h>
15733#endif
15734#ifdef HAVE_SYS_SOCKET_H
15735#include <sys/socket.h>
15736#endif
15737
Matthias Kloseb9621712010-04-24 17:59:49 +000015738"
Victor Stinnere0be4232011-10-25 13:06:09 +020015739if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015740
Martin v. Löwis11437992002-04-12 09:54:03 +000015741else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015742
Matthias Kloseb9621712010-04-24 17:59:49 +000015743$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015744
15745fi
15746
Michael W. Hudson54241132001-12-07 15:38:26 +000015747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15749$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015750if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015752else
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015754 ac_cv_broken_mbstowcs=no
15755else
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015757/* end confdefs.h. */
15758
Stefan Krah19c21392012-11-22 23:47:32 +010015759#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015760#include<stdlib.h>
15761int main() {
15762 size_t len = -1;
15763 const char *str = "text";
15764 len = mbstowcs(NULL, str, 0);
15765 return (len != 4);
15766}
15767
15768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015769if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015770 ac_cv_broken_mbstowcs=no
15771else
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15775 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015776fi
15777
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015778fi
15779
Matthias Kloseb9621712010-04-24 17:59:49 +000015780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15781$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015782if test "$ac_cv_broken_mbstowcs" = yes
15783then
15784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015786
15787fi
15788
Antoine Pitroub52ec782009-01-25 16:34:23 +000015789# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15791$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015792
15793# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015794if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015795 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015796if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015797then
15798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15802$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015803fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015804if test "$withval" = no
15805then
15806
15807$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15808
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15810$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015811fi
15812
Antoine Pitrou042b1282010-08-13 21:15:58 +000015813else
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15815$as_echo "no value specified" >&6; }
15816fi
15817
Antoine Pitroub52ec782009-01-25 16:34:23 +000015818
Matthias Kloseb17289e2012-03-15 19:51:34 +010015819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15820$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15821if ${ac_cv_computed_gotos+:} false; then :
15822 $as_echo_n "(cached) " >&6
15823else
15824 if test "$cross_compiling" = yes; then :
15825 if test "${with_computed_gotos+set}" = set; then
15826 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15827 else
15828 ac_cv_computed_gotos=no
15829 fi
15830else
15831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15832/* end confdefs.h. */
15833
15834int main(int argc, char **argv)
15835{
15836 static void *targets[1] = { &&LABEL1 };
15837 goto LABEL2;
15838LABEL1:
15839 return 0;
15840LABEL2:
15841 goto *targets[0];
15842 return 1;
15843}
15844
15845_ACEOF
15846if ac_fn_c_try_run "$LINENO"; then :
15847 ac_cv_computed_gotos=yes
15848else
15849 ac_cv_computed_gotos=no
15850fi
15851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15852 conftest.$ac_objext conftest.beam conftest.$ac_ext
15853fi
15854
15855fi
15856
15857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15858$as_echo "$ac_cv_computed_gotos" >&6; }
15859case "$ac_cv_computed_gotos" in yes*)
15860
15861$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15862
15863esac
15864
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015865case $ac_sys_system in
15866AIX*)
15867
15868$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15869 ;;
15870esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015871
Michael W. Hudson54241132001-12-07 15:38:26 +000015872
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015873
15874
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015875for h in `(cd $srcdir;echo Python/thread_*.h)`
15876do
15877 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15878done
15879
Michael W. Hudson54241132001-12-07 15:38:26 +000015880
Ned Deily0db50cf2014-07-25 12:41:31 -070015881SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15883$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015884for dir in $SRCDIRS; do
15885 if test ! -d $dir; then
15886 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015887 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015888done
Matthias Kloseb9621712010-04-24 17:59:49 +000015889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15890$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015891
Stefan Krah1919b7e2012-03-21 18:25:23 +010015892# Availability of -O2:
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15894$as_echo_n "checking for -O2... " >&6; }
15895saved_cflags="$CFLAGS"
15896CFLAGS="-O2"
15897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15898/* end confdefs.h. */
15899
15900int
15901main ()
15902{
15903
15904
15905 ;
15906 return 0;
15907}
15908_ACEOF
15909if ac_fn_c_try_compile "$LINENO"; then :
15910 have_O2=yes
15911else
15912 have_O2=no
15913fi
15914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15916$as_echo "$have_O2" >&6; }
15917CFLAGS="$saved_cflags"
15918
15919# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15920# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15922$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15923saved_cflags="$CFLAGS"
15924CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15925if test "$have_O2" = no; then
15926 CFLAGS=""
15927fi
15928if test "$cross_compiling" = yes; then :
15929 have_glibc_memmove_bug=undefined
15930else
15931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15932/* end confdefs.h. */
15933
15934#include <stdio.h>
15935#include <stdlib.h>
15936#include <string.h>
15937void foo(void *p, void *q) { memmove(p, q, 19); }
15938int main() {
15939 char a[32] = "123456789000000000";
15940 foo(&a[9], a);
15941 if (strcmp(a, "123456789123456789000000000") != 0)
15942 return 1;
15943 foo(a, &a[9]);
15944 if (strcmp(a, "123456789000000000") != 0)
15945 return 1;
15946 return 0;
15947}
15948
15949_ACEOF
15950if ac_fn_c_try_run "$LINENO"; then :
15951 have_glibc_memmove_bug=no
15952else
15953 have_glibc_memmove_bug=yes
15954fi
15955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15956 conftest.$ac_objext conftest.beam conftest.$ac_ext
15957fi
15958
15959CFLAGS="$saved_cflags"
15960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15961$as_echo "$have_glibc_memmove_bug" >&6; }
15962if test "$have_glibc_memmove_bug" = yes; then
15963
15964$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15965
15966fi
15967
15968if test "$have_gcc_asm_for_x87" = yes; then
15969 # Some versions of gcc miscompile inline asm:
15970 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15971 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15972 case $CC in
15973 *gcc*)
15974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15975$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15976 saved_cflags="$CFLAGS"
15977 CFLAGS="-O2"
15978 if test "$cross_compiling" = yes; then :
15979 have_ipa_pure_const_bug=undefined
15980else
15981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982/* end confdefs.h. */
15983
15984 __attribute__((noinline)) int
15985 foo(int *p) {
15986 int r;
15987 asm ( "movl \$6, (%1)\n\t"
15988 "xorl %0, %0\n\t"
15989 : "=r" (r) : "r" (p) : "memory"
15990 );
15991 return r;
15992 }
15993 int main() {
15994 int p = 8;
15995 if ((foo(&p) ? : p) != 6)
15996 return 1;
15997 return 0;
15998 }
15999
16000_ACEOF
16001if ac_fn_c_try_run "$LINENO"; then :
16002 have_ipa_pure_const_bug=no
16003else
16004 have_ipa_pure_const_bug=yes
16005fi
16006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16007 conftest.$ac_objext conftest.beam conftest.$ac_ext
16008fi
16009
16010 CFLAGS="$saved_cflags"
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16012$as_echo "$have_ipa_pure_const_bug" >&6; }
16013 if test "$have_ipa_pure_const_bug" = yes; then
16014
16015$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16016
16017 fi
16018 ;;
16019 esac
16020fi
16021
Victor Stinner4f5366e2015-01-09 02:13:19 +010016022# Check for stdatomic.h
16023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16024$as_echo_n "checking for stdatomic.h... " >&6; }
16025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16026/* end confdefs.h. */
16027
16028
16029 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016030 atomic_int value = ATOMIC_VAR_INIT(1);
16031 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016032 int main() {
16033 int loaded_value = atomic_load(&value);
16034 return 0;
16035 }
16036
16037
16038_ACEOF
16039if ac_fn_c_try_link "$LINENO"; then :
16040 have_stdatomic_h=yes
16041else
16042 have_stdatomic_h=no
16043fi
16044rm -f core conftest.err conftest.$ac_objext \
16045 conftest$ac_exeext conftest.$ac_ext
16046
16047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16048$as_echo "$have_stdatomic_h" >&6; }
16049
16050if test "$have_stdatomic_h" = yes; then
16051
16052$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16053
16054fi
16055
16056# Check for GCC >= 4.7 __atomic builtins
16057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16058$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16060/* end confdefs.h. */
16061
16062
16063 volatile int val = 1;
16064 int main() {
16065 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16066 return 0;
16067 }
16068
16069
16070_ACEOF
16071if ac_fn_c_try_link "$LINENO"; then :
16072 have_builtin_atomic=yes
16073else
16074 have_builtin_atomic=no
16075fi
16076rm -f core conftest.err conftest.$ac_objext \
16077 conftest$ac_exeext conftest.$ac_ext
16078
16079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16080$as_echo "$have_builtin_atomic" >&6; }
16081
16082if test "$have_builtin_atomic" = yes; then
16083
16084$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16085
16086fi
16087
Ned Deily322f5ba2013-11-21 23:01:59 -080016088# ensurepip option
16089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16090$as_echo_n "checking for ensurepip... " >&6; }
16091
16092# Check whether --with-ensurepip was given.
16093if test "${with_ensurepip+set}" = set; then :
16094 withval=$with_ensurepip;
16095else
16096 with_ensurepip=upgrade
16097fi
16098
16099case $with_ensurepip in #(
16100 yes|upgrade) :
16101 ENSUREPIP=upgrade ;; #(
16102 install) :
16103 ENSUREPIP=install ;; #(
16104 no) :
16105 ENSUREPIP=no ;; #(
16106 *) :
16107 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16108esac
16109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16110$as_echo "$ENSUREPIP" >&6; }
16111
16112
Victor Stinner35a97c02015-03-08 02:59:09 +010016113# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16115$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16117/* end confdefs.h. */
16118
16119
16120 #include <dirent.h>
16121
16122 int main() {
16123 struct dirent entry;
16124 return entry.d_type == DT_UNKNOWN;
16125 }
16126
16127
16128_ACEOF
16129if ac_fn_c_try_link "$LINENO"; then :
16130 have_dirent_d_type=yes
16131else
16132 have_dirent_d_type=no
16133fi
16134rm -f core conftest.err conftest.$ac_objext \
16135 conftest$ac_exeext conftest.$ac_ext
16136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16137$as_echo "$have_dirent_d_type" >&6; }
16138
16139if test "$have_dirent_d_type" = yes; then
16140
16141$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16142
16143fi
16144
Victor Stinner9eb57c52015-03-19 22:21:49 +010016145# check if the Linux getrandom() syscall is available
16146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16147$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16149/* end confdefs.h. */
16150
16151
Victor Stinner1b80b242016-04-12 22:34:58 +020016152 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016153 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016154 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016155
16156 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016157 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016158 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016159 const int flags = GRND_NONBLOCK;
16160 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016161 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016162 return 0;
16163 }
16164
16165
16166_ACEOF
16167if ac_fn_c_try_link "$LINENO"; then :
16168 have_getrandom_syscall=yes
16169else
16170 have_getrandom_syscall=no
16171fi
16172rm -f core conftest.err conftest.$ac_objext \
16173 conftest$ac_exeext conftest.$ac_ext
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16175$as_echo "$have_getrandom_syscall" >&6; }
16176
16177if test "$have_getrandom_syscall" = yes; then
16178
16179$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16180
16181fi
16182
Victor Stinner3abf44e2015-09-18 15:38:37 +020016183# check if the getrandom() function is available
16184# the test was written for the Solaris function of <sys/random.h>
16185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16186$as_echo_n "checking for the getrandom() function... " >&6; }
16187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16188/* end confdefs.h. */
16189
16190
16191 #include <sys/random.h>
16192
16193 int main() {
16194 char buffer[1];
16195 const size_t buflen = sizeof(buffer);
16196 const int flags = 0;
16197 /* ignore the result, Python checks for ENOSYS at runtime */
16198 (void)getrandom(buffer, buflen, flags);
16199 return 0;
16200 }
16201
16202
16203_ACEOF
16204if ac_fn_c_try_link "$LINENO"; then :
16205 have_getrandom=yes
16206else
16207 have_getrandom=no
16208fi
16209rm -f core conftest.err conftest.$ac_objext \
16210 conftest$ac_exeext conftest.$ac_ext
16211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16212$as_echo "$have_getrandom" >&6; }
16213
16214if test "$have_getrandom" = yes; then
16215
16216$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16217
16218fi
16219
Guido van Rossum627b2d71993-12-24 10:39:16 +000016220# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016221ac_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 +000016222
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016223ac_config_files="$ac_config_files Modules/ld_so_aix"
16224
Martin v. Löwis11437992002-04-12 09:54:03 +000016225cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016226# This file is a shell script that caches the results of configure
16227# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016228# scripts and configure runs, see configure's option --config-cache.
16229# It is not useful on other systems. If it contains results you don't
16230# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016231#
Martin v. Löwis11437992002-04-12 09:54:03 +000016232# config.status only pays attention to the cache file if you give it
16233# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016234#
Skip Montanaro6dead952003-09-25 14:50:04 +000016235# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016236# loading this file, other *unset* `ac_cv_foo' will be assigned the
16237# following values.
16238
16239_ACEOF
16240
Guido van Rossumf78abae1997-01-21 22:02:36 +000016241# The following way of writing the cache mishandles newlines in values,
16242# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016244# Ultrix sh set writes to stderr and can't be redirected directly,
16245# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016246(
16247 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16248 eval ac_val=\$$ac_var
16249 case $ac_val in #(
16250 *${as_nl}*)
16251 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016252 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16253$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 esac
16255 case $ac_var in #(
16256 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016257 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16258 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259 esac ;;
16260 esac
16261 done
16262
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16265 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016266 # `set' does not quote correctly, so add quotes: double-quote
16267 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016269 "s/'/'\\\\''/g;
16270 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 *)
16273 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276 esac |
16277 sort
16278) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16284 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16286 :end' >>confcache
16287if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16288 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016289 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016290 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16291$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016292 if test ! -f "$cache_file" || test -h "$cache_file"; then
16293 cat confcache >"$cache_file"
16294 else
16295 case $cache_file in #(
16296 */* | ?:*)
16297 mv -f confcache "$cache_file"$$ &&
16298 mv -f "$cache_file"$$ "$cache_file" ;; #(
16299 *)
16300 mv -f confcache "$cache_file" ;;
16301 esac
16302 fi
16303 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016304 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016305 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16306$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016307 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016308fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016309rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016310
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016311test "x$prefix" = xNONE && prefix=$ac_default_prefix
16312# Let make expand exec_prefix.
16313test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016314
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016315DEFS=-DHAVE_CONFIG_H
16316
Skip Montanaro6dead952003-09-25 14:50:04 +000016317ac_libobjs=
16318ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016319U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016320for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16321 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16325 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16327 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016328done
16329LIBOBJS=$ac_libobjs
16330
16331LTLIBOBJS=$ac_ltlibobjs
16332
16333
Martin v. Löwis11437992002-04-12 09:54:03 +000016334
Matthias Kloseb9621712010-04-24 17:59:49 +000016335
Victor Stinnere0be4232011-10-25 13:06:09 +020016336: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016337ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016338ac_clean_files_save=$ac_clean_files
16339ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016340{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16341$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16342as_write_fail=0
16343cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016344#! $SHELL
16345# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016346# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016347# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016348# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016351ac_cs_recheck=false
16352ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016353
Matthias Kloseb9621712010-04-24 17:59:49 +000016354SHELL=\${CONFIG_SHELL-$SHELL}
16355export SHELL
16356_ASEOF
16357cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16358## -------------------- ##
16359## M4sh Initialization. ##
16360## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362# Be more Bourne compatible
16363DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016364if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016365 emulate sh
16366 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016367 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016368 # is contrary to our usage. Disable this feature.
16369 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016370 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016371else
Matthias Kloseb9621712010-04-24 17:59:49 +000016372 case `(set -o) 2>/dev/null` in #(
16373 *posix*) :
16374 set -o posix ;; #(
16375 *) :
16376 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016378fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016379
16380
Matthias Kloseb9621712010-04-24 17:59:49 +000016381as_nl='
16382'
16383export as_nl
16384# Printing a long string crashes Solaris 7 /usr/bin/printf.
16385as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16386as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16387as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16388# Prefer a ksh shell builtin over an external printf program on Solaris,
16389# but without wasting forks for bash or zsh.
16390if test -z "$BASH_VERSION$ZSH_VERSION" \
16391 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16392 as_echo='print -r --'
16393 as_echo_n='print -rn --'
16394elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16395 as_echo='printf %s\n'
16396 as_echo_n='printf %s'
16397else
16398 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16399 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16400 as_echo_n='/usr/ucb/echo -n'
16401 else
16402 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16403 as_echo_n_body='eval
16404 arg=$1;
16405 case $arg in #(
16406 *"$as_nl"*)
16407 expr "X$arg" : "X\\(.*\\)$as_nl";
16408 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16409 esac;
16410 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16411 '
16412 export as_echo_n_body
16413 as_echo_n='sh -c $as_echo_n_body as_echo'
16414 fi
16415 export as_echo_body
16416 as_echo='sh -c $as_echo_body as_echo'
16417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016418
16419# The user is always right.
16420if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016421 PATH_SEPARATOR=:
16422 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16423 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16424 PATH_SEPARATOR=';'
16425 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428
16429# IFS
16430# We need space, tab and new line, in precisely that order. Quoting is
16431# there to prevent editors from complaining about space-tab.
16432# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16433# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434IFS=" "" $as_nl"
16435
16436# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016437as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016438case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016439 *[\\/]* ) as_myself=$0 ;;
16440 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016441for as_dir in $PATH
16442do
16443 IFS=$as_save_IFS
16444 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016445 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449 ;;
16450esac
16451# We did not find ourselves, most probably we were run as `sh COMMAND'
16452# in which case we are not to be found in the path.
16453if test "x$as_myself" = x; then
16454 as_myself=$0
16455fi
16456if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016457 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16458 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016459fi
16460
Matthias Kloseb9621712010-04-24 17:59:49 +000016461# Unset variables that we do not need and which cause bugs (e.g. in
16462# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16463# suppresses any "Segmentation fault" message there. '((' could
16464# trigger a bug in pdksh 5.2.14.
16465for as_var in BASH_ENV ENV MAIL MAILPATH
16466do eval test x\${$as_var+set} = xset \
16467 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016468done
16469PS1='$ '
16470PS2='> '
16471PS4='+ '
16472
16473# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016474LC_ALL=C
16475export LC_ALL
16476LANGUAGE=C
16477export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479# CDPATH.
16480(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16481
16482
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016483# as_fn_error STATUS ERROR [LINENO LOG_FD]
16484# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016485# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16486# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016487# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016488as_fn_error ()
16489{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016490 as_status=$1; test $as_status -eq 0 && as_status=1
16491 if test "$4"; then
16492 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16493 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016494 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016495 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016496 as_fn_exit $as_status
16497} # as_fn_error
16498
16499
16500# as_fn_set_status STATUS
16501# -----------------------
16502# Set $? to STATUS, without forking.
16503as_fn_set_status ()
16504{
16505 return $1
16506} # as_fn_set_status
16507
16508# as_fn_exit STATUS
16509# -----------------
16510# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16511as_fn_exit ()
16512{
16513 set +e
16514 as_fn_set_status $1
16515 exit $1
16516} # as_fn_exit
16517
16518# as_fn_unset VAR
16519# ---------------
16520# Portably unset VAR.
16521as_fn_unset ()
16522{
16523 { eval $1=; unset $1;}
16524}
16525as_unset=as_fn_unset
16526# as_fn_append VAR VALUE
16527# ----------------------
16528# Append the text in VALUE to the end of the definition contained in VAR. Take
16529# advantage of any shell optimizations that allow amortized linear growth over
16530# repeated appends, instead of the typical quadratic growth present in naive
16531# implementations.
16532if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16533 eval 'as_fn_append ()
16534 {
16535 eval $1+=\$2
16536 }'
16537else
16538 as_fn_append ()
16539 {
16540 eval $1=\$$1\$2
16541 }
16542fi # as_fn_append
16543
16544# as_fn_arith ARG...
16545# ------------------
16546# Perform arithmetic evaluation on the ARGs, and store the result in the
16547# global $as_val. Take advantage of shells that can avoid forks. The arguments
16548# must be portable across $(()) and expr.
16549if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16550 eval 'as_fn_arith ()
16551 {
16552 as_val=$(( $* ))
16553 }'
16554else
16555 as_fn_arith ()
16556 {
16557 as_val=`expr "$@" || test $? -eq 1`
16558 }
16559fi # as_fn_arith
16560
16561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562if expr a : '\(a\)' >/dev/null 2>&1 &&
16563 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16564 as_expr=expr
16565else
16566 as_expr=false
16567fi
16568
16569if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16570 as_basename=basename
16571else
16572 as_basename=false
16573fi
16574
Matthias Kloseb9621712010-04-24 17:59:49 +000016575if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16576 as_dirname=dirname
16577else
16578 as_dirname=false
16579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581as_me=`$as_basename -- "$0" ||
16582$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16583 X"$0" : 'X\(//\)$' \| \
16584 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016585$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016586 sed '/^.*\/\([^/][^/]*\)\/*$/{
16587 s//\1/
16588 q
16589 }
16590 /^X\/\(\/\/\)$/{
16591 s//\1/
16592 q
16593 }
16594 /^X\/\(\/\).*/{
16595 s//\1/
16596 q
16597 }
16598 s/.*/./; q'`
16599
Matthias Kloseb9621712010-04-24 17:59:49 +000016600# Avoid depending upon Character Ranges.
16601as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16602as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16603as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16604as_cr_digits='0123456789'
16605as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606
16607ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016608case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016610 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016612 xy) ECHO_C='\c';;
16613 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16614 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615 esac;;
16616*)
16617 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016619
Martin v. Löwis11437992002-04-12 09:54:03 +000016620rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621if test -d conf$$.dir; then
16622 rm -f conf$$.dir/conf$$.file
16623else
16624 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016625 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016627if (echo >conf$$.file) 2>/dev/null; then
16628 if ln -s conf$$.file conf$$ 2>/dev/null; then
16629 as_ln_s='ln -s'
16630 # ... but there are two gotchas:
16631 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16632 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016633 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016634 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016635 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016636 elif ln conf$$.file conf$$ 2>/dev/null; then
16637 as_ln_s=ln
16638 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016639 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016641else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016642 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16645rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016646
Matthias Kloseb9621712010-04-24 17:59:49 +000016647
16648# as_fn_mkdir_p
16649# -------------
16650# Create "$as_dir" as a directory, including parents if necessary.
16651as_fn_mkdir_p ()
16652{
16653
16654 case $as_dir in #(
16655 -*) as_dir=./$as_dir;;
16656 esac
16657 test -d "$as_dir" || eval $as_mkdir_p || {
16658 as_dirs=
16659 while :; do
16660 case $as_dir in #(
16661 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16662 *) as_qdir=$as_dir;;
16663 esac
16664 as_dirs="'$as_qdir' $as_dirs"
16665 as_dir=`$as_dirname -- "$as_dir" ||
16666$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16667 X"$as_dir" : 'X\(//\)[^/]' \| \
16668 X"$as_dir" : 'X\(//\)$' \| \
16669 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16670$as_echo X"$as_dir" |
16671 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16672 s//\1/
16673 q
16674 }
16675 /^X\(\/\/\)[^/].*/{
16676 s//\1/
16677 q
16678 }
16679 /^X\(\/\/\)$/{
16680 s//\1/
16681 q
16682 }
16683 /^X\(\/\).*/{
16684 s//\1/
16685 q
16686 }
16687 s/.*/./; q'`
16688 test -d "$as_dir" && break
16689 done
16690 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016691 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016692
16693
16694} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016695if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016696 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016697else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016698 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016699 as_mkdir_p=false
16700fi
16701
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016702
16703# as_fn_executable_p FILE
16704# -----------------------
16705# Test if FILE is an executable regular file.
16706as_fn_executable_p ()
16707{
16708 test -f "$1" && test -x "$1"
16709} # as_fn_executable_p
16710as_test_x='test -x'
16711as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
16713# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016714as_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 +000016715
16716# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016717as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016718
16719
Martin v. Löwis11437992002-04-12 09:54:03 +000016720exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016721## ----------------------------------- ##
16722## Main body of $CONFIG_STATUS script. ##
16723## ----------------------------------- ##
16724_ASEOF
16725test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016726
Matthias Kloseb9621712010-04-24 17:59:49 +000016727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16728# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016729# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016730# values after options handling.
16731ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016732This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016733generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016734
16735 CONFIG_FILES = $CONFIG_FILES
16736 CONFIG_HEADERS = $CONFIG_HEADERS
16737 CONFIG_LINKS = $CONFIG_LINKS
16738 CONFIG_COMMANDS = $CONFIG_COMMANDS
16739 $ $0 $@
16740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741on `(hostname || uname -n) 2>/dev/null | sed 1q`
16742"
16743
Martin v. Löwis11437992002-04-12 09:54:03 +000016744_ACEOF
16745
Matthias Kloseb9621712010-04-24 17:59:49 +000016746case $ac_config_files in *"
16747"*) set x $ac_config_files; shift; ac_config_files=$*;;
16748esac
16749
16750case $ac_config_headers in *"
16751"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16752esac
16753
16754
16755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016756# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016757config_files="$ac_config_files"
16758config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016761
Matthias Kloseb9621712010-04-24 17:59:49 +000016762cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016763ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016764\`$as_me' instantiates files and other configuration actions
16765from templates according to the current configuration. Unless the files
16766and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016767
Matthias Kloseb9621712010-04-24 17:59:49 +000016768Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016769
16770 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016772 --config print configuration, then exit
16773 -q, --quiet, --silent
16774 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016775 -d, --debug don't remove temporary files
16776 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016777 --file=FILE[:TEMPLATE]
16778 instantiate the configuration file FILE
16779 --header=FILE[:TEMPLATE]
16780 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016781
16782Configuration files:
16783$config_files
16784
16785Configuration headers:
16786$config_headers
16787
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016788Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016791cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16792ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016793ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016794python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016795configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016796 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016798Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016799This config.status script is free software; the Free Software Foundation
16800gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801
16802ac_pwd='$ac_pwd'
16803srcdir='$srcdir'
16804INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016805MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016806test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016807_ACEOF
16808
Matthias Kloseb9621712010-04-24 17:59:49 +000016809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16810# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016811ac_need_defaults=:
16812while test $# != 0
16813do
16814 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016815 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16817 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016818 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016820 --*=)
16821 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16822 ac_optarg=
16823 ac_shift=:
16824 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016825 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016826 ac_option=$1
16827 ac_optarg=$2
16828 ac_shift=shift
16829 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016830 esac
16831
Skip Montanaro6dead952003-09-25 14:50:04 +000016832 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016833 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016834 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16835 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016836 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016837 $as_echo "$ac_cs_version"; exit ;;
16838 --config | --confi | --conf | --con | --co | --c )
16839 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 debug=: ;;
16842 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016843 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016844 case $ac_optarg in
16845 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016846 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016847 esac
16848 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016849 ac_need_defaults=false;;
16850 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016851 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016852 case $ac_optarg in
16853 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16854 esac
16855 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016857 --he | --h)
16858 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016859 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016860Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016862 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016863 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16864 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16865 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016866
16867 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016868 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016869Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016870
Matthias Kloseb9621712010-04-24 17:59:49 +000016871 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016872 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016873
16874 esac
16875 shift
16876done
16877
Skip Montanaro6dead952003-09-25 14:50:04 +000016878ac_configure_extra_args=
16879
16880if $ac_cs_silent; then
16881 exec 6>/dev/null
16882 ac_configure_extra_args="$ac_configure_extra_args --silent"
16883fi
16884
16885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016886cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016887if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016888 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016889 shift
16890 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16891 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016892 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016893 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016894fi
16895
Martin v. Löwis11437992002-04-12 09:54:03 +000016896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016897cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898exec 5>>config.log
16899{
16900 echo
16901 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16902## Running $as_me. ##
16903_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016910
Matthias Kloseb9621712010-04-24 17:59:49 +000016911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912
16913# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016914for ac_config_target in $ac_config_targets
16915do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916 case $ac_config_target in
16917 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16918 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16919 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016920 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16921 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16923 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016924 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016925 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016926 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927
Victor Stinnere0be4232011-10-25 13:06:09 +020016928 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016929 esac
16930done
16931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932
Martin v. Löwis11437992002-04-12 09:54:03 +000016933# If the user did not use the arguments to specify the items to instantiate,
16934# then the envvar interface is used. Set only those that are not.
16935# We use the long form for the default assignment because of an extremely
16936# bizarre bug on SunOS 4.1.3.
16937if $ac_need_defaults; then
16938 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16939 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16940fi
16941
Skip Montanaro6dead952003-09-25 14:50:04 +000016942# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016944# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945# Hook for its removal unless debugging.
16946# Note that there is a small window in which the directory will not be cleaned:
16947# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016948$debug ||
16949{
Victor Stinnere0be4232011-10-25 13:06:09 +020016950 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016952 : "${ac_tmp:=$tmp}"
16953 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016954' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016955 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016956}
Martin v. Löwis11437992002-04-12 09:54:03 +000016957# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016958
Martin v. Löwis11437992002-04-12 09:54:03 +000016959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016961 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016962} ||
16963{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016964 tmp=./conf$$-$RANDOM
16965 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016966} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016967ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016968
Matthias Kloseb9621712010-04-24 17:59:49 +000016969# Set up the scripts for CONFIG_FILES section.
16970# No need to generate them if there are no CONFIG_FILES.
16971# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016973
Matthias Kloseb9621712010-04-24 17:59:49 +000016974
16975ac_cr=`echo X | tr X '\015'`
16976# On cygwin, bash can eat \r inside `` if the user requested igncr.
16977# But we know of no other shell where ac_cr would be empty at this
16978# point, so we can use a bashism as a fallback.
16979if test "x$ac_cr" = x; then
16980 eval ac_cr=\$\'\\r\'
16981fi
16982ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16983if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016984 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016985else
16986 ac_cs_awk_cr=$ac_cr
16987fi
16988
Victor Stinnere0be4232011-10-25 13:06:09 +020016989echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016990_ACEOF
16991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992
Matthias Kloseb9621712010-04-24 17:59:49 +000016993{
16994 echo "cat >conf$$subs.awk <<_ACEOF" &&
16995 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16996 echo "_ACEOF"
16997} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016998 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16999ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000ac_delim='%!_!# '
17001for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017002 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017003 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004
Matthias Kloseb9621712010-04-24 17:59:49 +000017005 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17006 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007 break
17008 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017009 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010 else
17011 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013done
Matthias Kloseb9621712010-04-24 17:59:49 +000017014rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017017cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017019sed -n '
17020h
17021s/^/S["/; s/!.*/"]=/
17022p
17023g
17024s/^[^!]*!//
17025:repl
17026t repl
17027s/'"$ac_delim"'$//
17028t delim
17029:nl
17030h
17031s/\(.\{148\}\)..*/\1/
17032t more1
17033s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17034p
17035n
17036b repl
17037:more1
17038s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17039p
17040g
17041s/.\{148\}//
17042t nl
17043:delim
17044h
17045s/\(.\{148\}\)..*/\1/
17046t more2
17047s/["\\]/\\&/g; s/^/"/; s/$/"/
17048p
17049b
17050:more2
17051s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17052p
17053g
17054s/.\{148\}//
17055t delim
17056' <conf$$subs.awk | sed '
17057/^[^""]/{
17058 N
17059 s/\n//
17060}
17061' >>$CONFIG_STATUS || ac_write_fail=1
17062rm -f conf$$subs.awk
17063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17064_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017065cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017066 for (key in S) S_is_set[key] = 1
17067 FS = ""
17068
17069}
17070{
17071 line = $ 0
17072 nfields = split(line, field, "@")
17073 substed = 0
17074 len = length(field[1])
17075 for (i = 2; i < nfields; i++) {
17076 key = field[i]
17077 keylen = length(key)
17078 if (S_is_set[key]) {
17079 value = S[key]
17080 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17081 len += length(value) + length(field[++i])
17082 substed = 1
17083 } else
17084 len += 1 + keylen
17085 }
17086
17087 print line
17088}
17089
17090_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17093if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17094 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17095else
17096 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017097fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017098 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017099_ACEOF
17100
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017101# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17102# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103# trailing colons and then remove the whole line if VPATH becomes empty
17104# (actually we leave an empty line to preserve line numbers).
17105if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017106 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17107h
17108s///
17109s/^/:/
17110s/[ ]*$/:/
17111s/:\$(srcdir):/:/g
17112s/:\${srcdir}:/:/g
17113s/:@srcdir@:/:/g
17114s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017116x
17117s/\(=[ ]*\).*/\1/
17118G
17119s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120s/^[^=]*=[ ]*$//
17121}'
17122fi
17123
Matthias Kloseb9621712010-04-24 17:59:49 +000017124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017125fi # test -n "$CONFIG_FILES"
17126
Matthias Kloseb9621712010-04-24 17:59:49 +000017127# Set up the scripts for CONFIG_HEADERS section.
17128# No need to generate them if there are no CONFIG_HEADERS.
17129# This happens for instance with `./config.status Makefile'.
17130if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017131cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017132BEGIN {
17133_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135# Transform confdefs.h into an awk script `defines.awk', embedded as
17136# here-document in config.status, that substitutes the proper values into
17137# config.h.in to produce config.h.
17138
17139# Create a delimiter string that does not exist in confdefs.h, to ease
17140# handling of long lines.
17141ac_delim='%!_!# '
17142for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017143 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17144 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017145 break
17146 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017147 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017148 else
17149 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17150 fi
17151done
17152
17153# For the awk script, D is an array of macro values keyed by name,
17154# likewise P contains macro parameters if any. Preserve backslash
17155# newline sequences.
17156
17157ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17158sed -n '
17159s/.\{148\}/&'"$ac_delim"'/g
17160t rset
17161:rset
17162s/^[ ]*#[ ]*define[ ][ ]*/ /
17163t def
17164d
17165:def
17166s/\\$//
17167t bsnl
17168s/["\\]/\\&/g
17169s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17170D["\1"]=" \3"/p
17171s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17172d
17173:bsnl
17174s/["\\]/\\&/g
17175s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17176D["\1"]=" \3\\\\\\n"\\/p
17177t cont
17178s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17179t cont
17180d
17181:cont
17182n
17183s/.\{148\}/&'"$ac_delim"'/g
17184t clear
17185:clear
17186s/\\$//
17187t bsnlc
17188s/["\\]/\\&/g; s/^/"/; s/$/"/p
17189d
17190:bsnlc
17191s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17192b cont
17193' <confdefs.h | sed '
17194s/'"$ac_delim"'/"\\\
17195"/g' >>$CONFIG_STATUS || ac_write_fail=1
17196
17197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17198 for (key in D) D_is_set[key] = 1
17199 FS = ""
17200}
17201/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17202 line = \$ 0
17203 split(line, arg, " ")
17204 if (arg[1] == "#") {
17205 defundef = arg[2]
17206 mac1 = arg[3]
17207 } else {
17208 defundef = substr(arg[1], 2)
17209 mac1 = arg[2]
17210 }
17211 split(mac1, mac2, "(") #)
17212 macro = mac2[1]
17213 prefix = substr(line, 1, index(line, defundef) - 1)
17214 if (D_is_set[macro]) {
17215 # Preserve the white space surrounding the "#".
17216 print prefix "define", macro P[macro] D[macro]
17217 next
17218 } else {
17219 # Replace #undef with comments. This is necessary, for example,
17220 # in the case of _POSIX_SOURCE, which is predefined and required
17221 # on some systems where configure will not decide to define it.
17222 if (defundef == "undef") {
17223 print "/*", prefix defundef, macro, "*/"
17224 next
17225 }
17226 }
17227}
17228{ print }
17229_ACAWK
17230_ACEOF
17231cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017232 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017233fi # test -n "$CONFIG_HEADERS"
17234
17235
17236eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17237shift
17238for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239do
17240 case $ac_tag in
17241 :[FHLC]) ac_mode=$ac_tag; continue;;
17242 esac
17243 case $ac_mode$ac_tag in
17244 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017245 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246 :[FH]-) ac_tag=-:-;;
17247 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17248 esac
17249 ac_save_IFS=$IFS
17250 IFS=:
17251 set x $ac_tag
17252 IFS=$ac_save_IFS
17253 shift
17254 ac_file=$1
17255 shift
17256
17257 case $ac_mode in
17258 :L) ac_source=$1;;
17259 :[FH])
17260 ac_file_inputs=
17261 for ac_f
17262 do
17263 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017264 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265 *) # Look for the file first in the build tree, then in the source tree
17266 # (if the path is not absolute). The absolute path cannot be DOS-style,
17267 # because $ac_f cannot contain `:'.
17268 test -f "$ac_f" ||
17269 case $ac_f in
17270 [\\/$]*) false;;
17271 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17272 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017273 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017275 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17276 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017277 done
17278
17279 # Let's still pretend it is `configure' which instantiates (i.e., don't
17280 # use $as_me), people would be surprised to read:
17281 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017282 configure_input='Generated from '`
17283 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17284 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285 if test x"$ac_file" != x-; then
17286 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017287 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17288$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017290 # Neutralize special characters interpreted by sed in replacement strings.
17291 case $configure_input in #(
17292 *\&* | *\|* | *\\* )
17293 ac_sed_conf_input=`$as_echo "$configure_input" |
17294 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17295 *) ac_sed_conf_input=$configure_input;;
17296 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017297
17298 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017299 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17300 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 esac
17302 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017303 esac
17304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017306$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017307 X"$ac_file" : 'X\(//\)[^/]' \| \
17308 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017310$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17312 s//\1/
17313 q
17314 }
17315 /^X\(\/\/\)[^/].*/{
17316 s//\1/
17317 q
17318 }
17319 /^X\(\/\/\)$/{
17320 s//\1/
17321 q
17322 }
17323 /^X\(\/\).*/{
17324 s//\1/
17325 q
17326 }
17327 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017328 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 ac_builddir=.
17330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331case "$ac_dir" in
17332.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17333*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017336 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017337 case $ac_top_builddir_sub in
17338 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17339 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17340 esac ;;
17341esac
17342ac_abs_top_builddir=$ac_pwd
17343ac_abs_builddir=$ac_pwd$ac_dir_suffix
17344# for backward compatibility:
17345ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017346
17347case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350 ac_top_srcdir=$ac_top_builddir_sub
17351 ac_abs_top_srcdir=$ac_pwd ;;
17352 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017353 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354 ac_top_srcdir=$srcdir
17355 ac_abs_top_srcdir=$srcdir ;;
17356 *) # Relative name.
17357 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17358 ac_top_srcdir=$ac_top_build_prefix$srcdir
17359 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017360esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017362
Martin v. Löwis11437992002-04-12 09:54:03 +000017363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364 case $ac_mode in
17365 :F)
17366 #
17367 # CONFIG_FILE
17368 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017369
17370 case $INSTALL in
17371 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017373 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017374 ac_MKDIR_P=$MKDIR_P
17375 case $MKDIR_P in
17376 [\\/$]* | ?:[\\/]* ) ;;
17377 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17378 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017379_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380
Matthias Kloseb9621712010-04-24 17:59:49 +000017381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382# If the template does not know about datarootdir, expand it.
17383# FIXME: This hack should be removed a few years after 2.60.
17384ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017385ac_sed_dataroot='
17386/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 p
17388 q
17389}
17390/@datadir@/p
17391/@docdir@/p
17392/@infodir@/p
17393/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017394/@mandir@/p'
17395case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396*datarootdir*) ac_datarootdir_seen=yes;;
17397*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017398 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17399$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017401cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402 ac_datarootdir_hack='
17403 s&@datadir@&$datadir&g
17404 s&@docdir@&$docdir&g
17405 s&@infodir@&$infodir&g
17406 s&@localedir@&$localedir&g
17407 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017408 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409esac
17410_ACEOF
17411
17412# Neutralize VPATH when `$srcdir' = `.'.
17413# Shell code in configure.ac might set extrasub.
17414# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017415cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17416ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017417$extrasub
17418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017420:t
17421/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017422s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017424s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425s&@srcdir@&$ac_srcdir&;t t
17426s&@abs_srcdir@&$ac_abs_srcdir&;t t
17427s&@top_srcdir@&$ac_top_srcdir&;t t
17428s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17429s&@builddir@&$ac_builddir&;t t
17430s&@abs_builddir@&$ac_abs_builddir&;t t
17431s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17432s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017433s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017435"
Victor Stinnere0be4232011-10-25 13:06:09 +020017436eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17437 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017440 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17441 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17442 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017444which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017445$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017446which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017447
Victor Stinnere0be4232011-10-25 13:06:09 +020017448 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017450 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17451 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017452 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017453 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454 ;;
17455 :H)
17456 #
17457 # CONFIG_HEADER
17458 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017460 {
17461 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017462 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17463 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017464 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017465 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017466 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17467$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017469 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017470 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017471 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017472 fi
17473 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017474 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017475 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017476 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480
17481 esac
17482
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017483
17484 case $ac_file$ac_mode in
17485 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17486
17487 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017488done # for ac_tag
17489
Guido van Rossum627b2d71993-12-24 10:39:16 +000017490
Matthias Kloseb9621712010-04-24 17:59:49 +000017491as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017492_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017493ac_clean_files=$ac_clean_files_save
17494
Matthias Kloseb9621712010-04-24 17:59:49 +000017495test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017496 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017497
Martin v. Löwis11437992002-04-12 09:54:03 +000017498
17499# configure is writing to config.log, and then calls config.status.
17500# config.status does its own redirection, appending to config.log.
17501# Unfortunately, on DOS this fails, as config.log is still kept open
17502# by configure, so config.status won't be able to write to it; its
17503# output is simply discarded. So we exec the FD to /dev/null,
17504# effectively closing config.log, so it can be properly (re)opened and
17505# appended to by config.status. When coming back to configure, we
17506# need to make the FD available again.
17507if test "$no_create" != yes; then
17508 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017509 ac_config_status_args=
17510 test "$silent" = yes &&
17511 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017513 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017514 exec 5>>config.log
17515 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17516 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017517 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017518fi
17519if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17521$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017522fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017523
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017524
Christian Heimes75ed8902013-11-20 01:11:18 +010017525echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017526if test ! -f Modules/Setup
17527then
17528 cp $srcdir/Modules/Setup.dist Modules/Setup
17529fi
17530
Christian Heimes75ed8902013-11-20 01:11:18 +010017531echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017532if test ! -f Modules/Setup.local
17533then
17534 echo "# Edit this file for local setup changes" >Modules/Setup.local
17535fi
17536
Christian Heimes75ed8902013-11-20 01:11:18 +010017537echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017538$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17539 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017540 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017541mv config.c Modules