blob: 91d0a2fdb71cf3dac6c1e1ce22a04eb266dbcd19 [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
Benjamin Peterson4fe55102016-09-06 11:58:01 -07008474ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <stdint.h>
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008475 #include <inttypes.h>
Matthias Kloseb9621712010-04-24 17:59:49 +00008476"
Victor Stinnere0be4232011-10-25 13:06:09 +02008477if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008478
8479cat >>confdefs.h <<_ACEOF
8480#define HAVE_UINTPTR_T 1
8481_ACEOF
8482
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483# The cast to long int works around a bug in the HP C Compiler
8484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8486# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8488$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008489if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 if test "$ac_cv_type_uintptr_t" = yes; then
8496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008498as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008499See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500 else
8501 ac_cv_sizeof_uintptr_t=0
8502 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504
Martin v. Löwis11437992002-04-12 09:54:03 +00008505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8507$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508
8509
8510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008512#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008513_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008514
Michael W. Hudson54241132001-12-07 15:38:26 +00008515
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008516fi
8517
Thomas Wouters89f507f2006-12-13 04:49:30 +00008518
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008519# The cast to long int works around a bug in the HP C Compiler
8520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8522# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8524$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008525if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008529#ifdef HAVE_SYS_TYPES_H
8530#include <sys/types.h>
8531#endif
8532
Matthias Kloseb9621712010-04-24 17:59:49 +00008533"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008534
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008535else
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 if test "$ac_cv_type_off_t" = yes; then
8537 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8538$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008539as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008540See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008541 else
8542 ac_cv_sizeof_off_t=0
8543 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008545
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8548$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008549
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008550
8551
Martin v. Löwis11437992002-04-12 09:54:03 +00008552cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008553#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008554_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008555
Michael W. Hudson54241132001-12-07 15:38:26 +00008556
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008557
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8559$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008560if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008561 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008562
Matthias Kloseb9621712010-04-24 17:59:49 +00008563$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008564
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8566$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8569$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008570fi
8571
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008572# The cast to long int works around a bug in the HP C Compiler
8573# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8574# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8575# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8577$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008578if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008580else
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008582#ifdef HAVE_SYS_TYPES_H
8583#include <sys/types.h>
8584#endif
8585#ifdef HAVE_TIME_H
8586#include <time.h>
8587#endif
8588
Matthias Kloseb9621712010-04-24 17:59:49 +00008589"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008590
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008591else
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 if test "$ac_cv_type_time_t" = yes; then
8593 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8594$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008595as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008596See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008597 else
8598 ac_cv_sizeof_time_t=0
8599 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008601
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8604$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008605
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008606
8607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008609#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008610_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008611
Michael W. Hudson54241132001-12-07 15:38:26 +00008612
8613
Trent Mick635f6fb2000-08-23 21:33:05 +00008614# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008615ac_save_cc="$CC"
8616if test "$ac_cv_kpthread" = "yes"
8617then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008618elif test "$ac_cv_kthread" = "yes"
8619then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008620elif test "$ac_cv_pthread" = "yes"
8621then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008622fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008623
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8625$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008626have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008628/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008629
8630 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008631int
8632main ()
8633{
Guido van Rossum12580492000-09-24 16:47:19 +00008634pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ;
8636 return 0;
8637}
Matthias Kloseb159a552010-04-25 21:00:44 +00008638
Martin v. Löwis11437992002-04-12 09:54:03 +00008639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008640if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008641 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8645$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008646if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008648# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8649# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8650# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8652$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008653if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008655else
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008657#ifdef HAVE_PTHREAD_H
8658#include <pthread.h>
8659#endif
8660
Matthias Kloseb9621712010-04-24 17:59:49 +00008661"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008662
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 if test "$ac_cv_type_pthread_t" = yes; then
8665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008667as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008668See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008669 else
8670 ac_cv_sizeof_pthread_t=0
8671 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673
Trent Mick635f6fb2000-08-23 21:33:05 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8676$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008677
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008678
8679
Martin v. Löwis11437992002-04-12 09:54:03 +00008680cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008681#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008682_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008683
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008684
Trent Mick635f6fb2000-08-23 21:33:05 +00008685fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008686CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008687
Michael W. Hudson54241132001-12-07 15:38:26 +00008688
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008689case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008690 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008691 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8692 ;;
8693 Darwin/*)
8694 OTHER_LIBTOOL_OPT=""
8695 ;;
8696esac
8697
8698
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008699
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008700case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008701 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008702 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8703 if test "${enable_universalsdk}"; then
8704 :
8705 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008706 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008707 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008708 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008709 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008710 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008711 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008712 if test ${gcc_version} '<' 4.0
8713 then
8714 LIBTOOL_CRUFT="-lcc_dynamic"
8715 else
8716 LIBTOOL_CRUFT=""
8717 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008719 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008722/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008723
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008724 #include <unistd.h>
8725 int main(int argc, char*argv[])
8726 {
8727 if (sizeof(long) == 4) {
8728 return 0;
8729 } else {
8730 return 1;
8731 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008732 }
8733
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008735if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008736 ac_osx_32bit=yes
8737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008742fi
8743
8744
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008745 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008746 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008747 i386)
8748 MACOSX_DEFAULT_ARCH="i386"
8749 ;;
8750 ppc)
8751 MACOSX_DEFAULT_ARCH="ppc"
8752 ;;
8753 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008754 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008755 ;;
8756 esac
8757 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008758 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008759 i386)
8760 MACOSX_DEFAULT_ARCH="x86_64"
8761 ;;
8762 ppc)
8763 MACOSX_DEFAULT_ARCH="ppc64"
8764 ;;
8765 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008766 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008767 ;;
8768 esac
8769
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008770 fi
8771
8772 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008773 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008774 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008775esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8777$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008778if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008779then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008780 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008781 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008782 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008785
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8787$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008788 if test $enable_shared = "yes"
8789 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008790 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 +00008791 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008792else
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008795fi
8796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8798$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008799case $ac_sys_system/$ac_sys_release in
8800 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008803
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8805$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008806 ;;
8807 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8809$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008810 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008811esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008812
Guido van Rossum0a516c91994-09-12 10:58:40 +00008813# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008814
Michael W. Hudson54241132001-12-07 15:38:26 +00008815
8816
8817
8818
Benjamin Peterson99f03762010-04-11 22:15:28 +00008819
Thomas Wouters477c8d52006-05-27 19:21:47 +00008820
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008821# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8822# -- usually .so, .sl on HP-UX, .dll on Cygwin
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8824$as_echo_n "checking the extension of shared libraries... " >&6; }
8825if test -z "$SHLIB_SUFFIX"; then
8826 case $ac_sys_system in
8827 hp*|HP*)
8828 case `uname -m` in
8829 ia64) SHLIB_SUFFIX=.so;;
8830 *) SHLIB_SUFFIX=.sl;;
8831 esac
8832 ;;
8833 CYGWIN*) SHLIB_SUFFIX=.dll;;
8834 *) SHLIB_SUFFIX=.so;;
8835 esac
8836fi
8837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8838$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008839
Guido van Rossum0a516c91994-09-12 10:58:40 +00008840# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008841# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008842# (Shared libraries in this instance are shared modules to be loaded into
8843# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8845$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008846if test -z "$LDSHARED"
8847then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008848 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008849 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008850 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008851 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008852 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008853 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008854 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008856 if test "$GCC" = "yes" ; then
8857 LDSHARED='$(CC) -shared'
8858 LDCXXSHARED='$(CXX) -shared'
8859 else
8860 LDSHARED='$(CC) -G'
8861 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008862 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008863 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008864 if test "$GCC" = "yes" ; then
8865 LDSHARED='$(CC) -shared'
8866 LDCXXSHARED='$(CXX) -shared'
8867 else
8868 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008869 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008870 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008871 LDSHARED='$(CC) -bundle'
8872 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008873 if test "$enable_framework" ; then
8874 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008875 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8876 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008877 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008878 else
8879 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008880 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008881 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008882 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008883 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008884 LDSHARED='$(CC) -bundle'
8885 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008886 if test "$enable_framework" ; then
8887 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008888 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8889 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008890 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008891 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008892 # No framework, use the Python app as bundle-loader
8893 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008894 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008895 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008896 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008897 Darwin/*)
8898 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8899 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008900
Ned Deily36820b62014-06-25 13:44:22 -07008901 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8902 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8903 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8904 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8905 if test ${dep_target_major} -eq 10 && \
8906 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008907 then
Ned Deily36820b62014-06-25 13:44:22 -07008908 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008909 LDSHARED='$(CC) -bundle'
8910 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008911 if test "$enable_framework" ; then
8912 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008913 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8914 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008915 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008916 else
8917 # No framework, use the Python app as bundle-loader
8918 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8919 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008920 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008921 fi
Ned Deily36820b62014-06-25 13:44:22 -07008922 else
8923 # building for OS X 10.3 and later
8924 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8925 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8926 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008927 fi
8928 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008929 Linux*|GNU*|QNX*)
8930 LDSHARED='$(CC) -shared'
8931 LDCXXSHARED='$(CXX) -shared';;
8932 BSD/OS*/4*)
8933 LDSHARED="gcc -shared"
8934 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008935 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008936 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008937 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008938 LDSHARED='$(CC) -shared'
8939 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008940 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008941 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008942 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008943 OpenBSD*)
8944 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8945 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008946 LDSHARED='$(CC) -shared $(CCSHARED)'
8947 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008948 else
8949 case `uname -r` in
8950 [01].* | 2.[0-7] | 2.[0-7].*)
8951 LDSHARED="ld -Bshareable ${LDFLAGS}"
8952 ;;
8953 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008954 LDSHARED='$(CC) -shared $(CCSHARED)'
8955 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008956 ;;
8957 esac
8958 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008959 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008960 LDSHARED='$(CC) -shared'
8961 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008962 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008963 if test "$GCC" = "yes" ; then
8964 LDSHARED='$(CC) -shared'
8965 LDCXXSHARED='$(CXX) -shared'
8966 else
8967 LDSHARED='$(CC) -G'
8968 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008969 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008970 SCO_SV*)
8971 LDSHARED='$(CC) -Wl,-G,-Bexport'
8972 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8973 CYGWIN*)
8974 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8975 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008976 *) LDSHARED="ld";;
8977 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8980$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008981LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008982BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008983# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008984# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8986$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008987if test -z "$CCSHARED"
8988then
Guido van Rossum07397971997-04-29 21:49:50 +00008989 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008990 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008991 then CCSHARED="-fPIC";
8992 elif test `uname -p` = sparc;
8993 then CCSHARED="-xcode=pic32";
8994 else CCSHARED="-Kpic";
8995 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008996 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008997 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008998 else CCSHARED="+z";
8999 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009000 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009001 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009002 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009003 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009004 if test "$GCC" = "yes"
9005 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009006 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009007 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009008 SCO_SV*)
9009 if test "$GCC" = "yes"
9010 then CCSHARED="-fPIC"
9011 else CCSHARED="-Kpic -belf"
9012 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009013 IRIX*/6*) case $CC in
9014 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009015 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009016 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009017 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9020$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009021# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009022# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9024$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009025if test -z "$LINKFORSHARED"
9026then
Guido van Rossum07397971997-04-29 21:49:50 +00009027 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009028 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009029 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009030 LINKFORSHARED="-Wl,-E -Wl,+s";;
9031# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009032 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009033 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009034 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009036 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009037
9038 # Issue #18075: the default maximum stack size (8MBytes) is too
9039 # small for the default recursion limit. Increase the stack size
9040 # to ensure that tests don't crash
9041 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9042
Jack Jansene578a632001-08-15 01:27:14 +00009043 if test "$enable_framework"
9044 then
Jack Jansenda49e192005-01-07 13:08:22 +00009045 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009046 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009047 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009048 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009049 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009050 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009051 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009052 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9053 then
9054 LINKFORSHARED="-Wl,--export-dynamic"
9055 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009056 SunOS/5*) case $CC in
9057 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009058 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009059 then
9060 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009061 fi;;
9062 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009063 CYGWIN*)
9064 if test $enable_shared = "no"
9065 then
9066 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9067 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009068 QNX*)
9069 # -Wl,-E causes the symbols to be added to the dynamic
9070 # symbol table so that they can be found when a module
9071 # is loaded. -N 2048K causes the stack size to be set
9072 # to 2048 kilobytes so that the stack doesn't overflow
9073 # when running test_compile.py.
9074 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009075 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9078$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009079
Michael W. Hudson54241132001-12-07 15:38:26 +00009080
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009081
Matthias Kloseb9621712010-04-24 17:59:49 +00009082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9083$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009084if test ! "$LIBRARY" = "$LDLIBRARY"
9085then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009086 case $ac_sys_system in
9087 CYGWIN*)
9088 # Cygwin needs CCSHARED when building extension DLLs
9089 # but not when building the interpreter DLL.
9090 CFLAGSFORSHARED='';;
9091 *)
9092 CFLAGSFORSHARED='$(CCSHARED)'
9093 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9096$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009097
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009098# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9099# library (with --enable-shared).
9100# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009101# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9102# if it is not required, since it creates a dependency of the shared library
9103# to LIBS. This, in turn, means that applications linking the shared libpython
9104# don't need to link LIBS explicitly. The default should be only changed
9105# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009106
Matthias Kloseb9621712010-04-24 17:59:49 +00009107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9108$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009109case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009110 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009111 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009112esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9114$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009115
9116
Guido van Rossum627b2d71993-12-24 10:39:16 +00009117# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9119$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009120if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009121 $as_echo_n "(cached) " >&6
9122else
9123 ac_check_lib_save_LIBS=$LIBS
9124LIBS="-lsendfile $LIBS"
9125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9126/* end confdefs.h. */
9127
9128/* 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. */
9131#ifdef __cplusplus
9132extern "C"
9133#endif
9134char sendfile ();
9135int
9136main ()
9137{
9138return sendfile ();
9139 ;
9140 return 0;
9141}
9142_ACEOF
9143if ac_fn_c_try_link "$LINENO"; then :
9144 ac_cv_lib_sendfile_sendfile=yes
9145else
9146 ac_cv_lib_sendfile_sendfile=no
9147fi
9148rm -f core conftest.err conftest.$ac_objext \
9149 conftest$ac_exeext conftest.$ac_ext
9150LIBS=$ac_check_lib_save_LIBS
9151fi
9152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9153$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009154if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009155 cat >>confdefs.h <<_ACEOF
9156#define HAVE_LIBSENDFILE 1
9157_ACEOF
9158
9159 LIBS="-lsendfile $LIBS"
9160
9161fi
9162
Matthias Kloseb9621712010-04-24 17:59:49 +00009163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9164$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009165if ${ac_cv_lib_dl_dlopen+:} 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="-ldl $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 dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009180int
9181main ()
9182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183return dlopen ();
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_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009190else
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5
9198$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009199if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 cat >>confdefs.h <<_ACEOF
9201#define HAVE_LIBDL 1
9202_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009203
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009204 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009206fi
9207 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9209$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009210if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009212else
Martin v. Löwis11437992002-04-12 09:54:03 +00009213 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009214LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218/* Override any GCC internal prototype to avoid an error.
9219 Use char because int might match the return type of a GCC
9220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009221#ifdef __cplusplus
9222extern "C"
9223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009224char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009225int
9226main ()
9227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 ;
9230 return 0;
9231}
9232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009235else
Matthias Kloseb9621712010-04-24 17:59:49 +00009236 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009238rm -f core conftest.err conftest.$ac_objext \
9239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9243$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009244if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 cat >>confdefs.h <<_ACEOF
9246#define HAVE_LIBDLD 1
9247_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009248
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009249 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009250
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009251fi
9252 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009253
Georg Brandlb1441c72009-01-03 22:33:39 +00009254# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009255if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9257$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009258if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009259 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009260else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009261 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265/* Override any GCC internal prototype to avoid an error.
9266 Use char because int might match the return type of a GCC
9267 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009268#ifdef __cplusplus
9269extern "C"
9270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009271char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009272int
9273main ()
9274{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 ;
9277 return 0;
9278}
9279_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280for ac_lib in '' pthread rt posix4; do
9281 if test -z "$ac_lib"; then
9282 ac_res="none required"
9283 else
9284 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009285 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009286 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009290rm -f core conftest.err conftest.$ac_objext \
9291 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009292 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009295done
Victor Stinnere0be4232011-10-25 13:06:09 +02009296if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298else
9299 ac_cv_search_sem_init=no
9300fi
9301rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009302LIBS=$ac_func_search_save_LIBS
9303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9305$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009307if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009309
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009310fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009311 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009312 # posix4 on Solaris 2.6
9313 # pthread (first!) on Linux
9314fi
9315
Martin v. Löwis19d17342003-06-14 21:03:05 +00009316# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9318$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009319if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009320 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009321else
9322 ac_check_lib_save_LIBS=$LIBS
9323LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009325/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327/* Override any GCC internal prototype to avoid an error.
9328 Use char because int might match the return type of a GCC
9329 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009330#ifdef __cplusplus
9331extern "C"
9332#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009333char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009334int
9335main ()
9336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009338 ;
9339 return 0;
9340}
9341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009342if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009343 ac_cv_lib_intl_textdomain=yes
9344else
Matthias Kloseb9621712010-04-24 17:59:49 +00009345 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009347rm -f core conftest.err conftest.$ac_objext \
9348 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009349LIBS=$ac_check_lib_save_LIBS
9350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9352$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009353if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009356
Brett Cannonc6d936e2009-06-07 20:09:53 +00009357 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009358fi
9359
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009360
9361# checks for system dependent C++ extensions support
9362case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9364$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009366/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009367
Georg Brandl59e87bd2011-02-15 19:48:59 +00009368 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009369int
9370main ()
9371{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009372loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 ;
9374 return 0;
9375}
Matthias Kloseb159a552010-04-25 21:00:44 +00009376
Martin v. Löwis11437992002-04-12 09:54:03 +00009377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009378if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009379
Matthias Kloseb159a552010-04-25 21:00:44 +00009380
Matthias Kloseb9621712010-04-24 17:59:49 +00009381$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009382
Matthias Kloseb159a552010-04-25 21:00:44 +00009383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009384$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009385
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009386else
Matthias Kloseb159a552010-04-25 21:00:44 +00009387
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009389$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009390
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009392rm -f core conftest.err conftest.$ac_objext \
9393 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009394 *) ;;
9395esac
9396
Christian Heimes985ecdc2013-11-20 11:46:18 +01009397# check for systems that require aligned memory access
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9399$as_echo_n "checking aligned memory access is required... " >&6; }
9400if test "$cross_compiling" = yes; then :
9401 aligned_required=yes
9402else
9403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9404/* end confdefs.h. */
9405
9406int main()
9407{
9408 char s[16];
9409 int i, *p1, *p2;
9410 for (i=0; i < 16; i++)
9411 s[i] = i;
9412 p1 = (int*)(s+1);
9413 p2 = (int*)(s+2);
9414 if (*p1 == *p2)
9415 return 1;
9416 return 0;
9417}
9418
9419_ACEOF
9420if ac_fn_c_try_run "$LINENO"; then :
9421 aligned_required=no
9422else
9423 aligned_required=yes
9424fi
9425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9426 conftest.$ac_objext conftest.beam conftest.$ac_ext
9427fi
9428
9429
9430if test "$aligned_required" = yes ; then
9431
9432$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9433
9434fi
9435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9436$as_echo "$aligned_required" >&6; }
9437
9438
9439# str, bytes and memoryview hash algorithm
9440
9441
9442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9443$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9444
9445# Check whether --with-hash_algorithm was given.
9446if test "${with_hash_algorithm+set}" = set; then :
9447 withval=$with_hash_algorithm;
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9449$as_echo "$withval" >&6; }
9450case "$withval" in
9451 siphash24)
9452 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9453
9454 ;;
9455 fnv)
9456 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9457
9458 ;;
9459 *)
9460 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9461 ;;
9462esac
9463
9464else
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9466$as_echo "default" >&6; }
9467fi
9468
9469
Charles-François Natalid30b0222014-05-08 23:08:51 +01009470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9471$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9472
9473# Check whether --with-address_sanitizer was given.
9474if test "${with_address_sanitizer+set}" = set; then :
9475 withval=$with_address_sanitizer;
9476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9477$as_echo "$withval" >&6; }
9478BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9479LDFLAGS="-fsanitize=address $LDFLAGS"
9480
9481else
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483$as_echo "no" >&6; }
9484fi
9485
9486
Guido van Rossum70c7f481998-03-26 18:44:10 +00009487# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9489$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009490if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009492else
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009494LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498/* Override any GCC internal prototype to avoid an error.
9499 Use char because int might match the return type of a GCC
9500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501#ifdef __cplusplus
9502extern "C"
9503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009504char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009505int
9506main ()
9507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ;
9510 return 0;
9511}
9512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009515else
Matthias Kloseb9621712010-04-24 17:59:49 +00009516 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518rm -f core conftest.err conftest.$ac_objext \
9519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009520LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9523$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009524if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009525 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009526fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009527 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9529$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009530if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009532else
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009534LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009538/* Override any GCC internal prototype to avoid an error.
9539 Use char because int might match the return type of a GCC
9540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009541#ifdef __cplusplus
9542extern "C"
9543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009544char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009545int
9546main ()
9547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 ;
9550 return 0;
9551}
9552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009555else
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009558rm -f core conftest.err conftest.$ac_objext \
9559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009560LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9563$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009564if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009565 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009566fi
9567 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009568
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9570$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009573if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9576$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009577LIBS="$withval $LIBS"
9578
9579else
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9581$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582fi
9583
Guido van Rossum7f43da71994-08-01 12:15:30 +00009584
Victor Stinner8291b5e2015-03-20 16:03:14 +01009585
9586
9587
9588
9589
9590
9591
9592if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9593 if test -n "$ac_tool_prefix"; then
9594 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9595set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9597$as_echo_n "checking for $ac_word... " >&6; }
9598if ${ac_cv_path_PKG_CONFIG+:} false; then :
9599 $as_echo_n "(cached) " >&6
9600else
9601 case $PKG_CONFIG in
9602 [\\/]* | ?:[\\/]*)
9603 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9604 ;;
9605 *)
9606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9607for as_dir in $PATH
9608do
9609 IFS=$as_save_IFS
9610 test -z "$as_dir" && as_dir=.
9611 for ac_exec_ext in '' $ac_executable_extensions; do
9612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9613 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9615 break 2
9616 fi
9617done
9618 done
9619IFS=$as_save_IFS
9620
9621 ;;
9622esac
9623fi
9624PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9625if test -n "$PKG_CONFIG"; then
9626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9627$as_echo "$PKG_CONFIG" >&6; }
9628else
9629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9630$as_echo "no" >&6; }
9631fi
9632
9633
9634fi
9635if test -z "$ac_cv_path_PKG_CONFIG"; then
9636 ac_pt_PKG_CONFIG=$PKG_CONFIG
9637 # Extract the first word of "pkg-config", so it can be a program name with args.
9638set dummy pkg-config; ac_word=$2
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640$as_echo_n "checking for $ac_word... " >&6; }
9641if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9642 $as_echo_n "(cached) " >&6
9643else
9644 case $ac_pt_PKG_CONFIG in
9645 [\\/]* | ?:[\\/]*)
9646 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9647 ;;
9648 *)
9649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9650for as_dir in $PATH
9651do
9652 IFS=$as_save_IFS
9653 test -z "$as_dir" && as_dir=.
9654 for ac_exec_ext in '' $ac_executable_extensions; do
9655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9656 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9658 break 2
9659 fi
9660done
9661 done
9662IFS=$as_save_IFS
9663
9664 ;;
9665esac
9666fi
9667ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9668if test -n "$ac_pt_PKG_CONFIG"; then
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9670$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9671else
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673$as_echo "no" >&6; }
9674fi
9675
9676 if test "x$ac_pt_PKG_CONFIG" = x; then
9677 PKG_CONFIG=""
9678 else
9679 case $cross_compiling:$ac_tool_warned in
9680yes:)
9681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9683ac_tool_warned=yes ;;
9684esac
9685 PKG_CONFIG=$ac_pt_PKG_CONFIG
9686 fi
9687else
9688 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9689fi
9690
9691fi
9692if test -n "$PKG_CONFIG"; then
9693 _pkg_min_version=0.9.0
9694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9695$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9696 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9698$as_echo "yes" >&6; }
9699 else
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
9702 PKG_CONFIG=""
9703 fi
9704fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009705
9706# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9708$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009709
9710# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009711if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009712 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009713else
9714 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009715fi
9716
9717
Matthias Kloseb9621712010-04-24 17:59:49 +00009718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9719$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009720
9721# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9723$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009724
9725# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009726if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009727 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009728else
9729 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009730fi
9731
9732
9733if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009734 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9735else
9736 LIBFFI_INCLUDEDIR=""
9737fi
9738
9739
Matthias Kloseb9621712010-04-24 17:59:49 +00009740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9741$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009742
Stefan Krah60187b52012-03-23 19:06:27 +01009743# Check for use of the system libmpdec library
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9745$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9746
9747# Check whether --with-system_libmpdec was given.
9748if test "${with_system_libmpdec+set}" = set; then :
9749 withval=$with_system_libmpdec;
9750else
9751 with_system_libmpdec="no"
9752fi
9753
9754
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9756$as_echo "$with_system_libmpdec" >&6; }
9757
Benjamin Peterson076ed002010-10-31 17:11:02 +00009758# Check for support for loadable sqlite extensions
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9760$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9761# Check whether --enable-loadable-sqlite-extensions was given.
9762if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9763 enableval=$enable_loadable_sqlite_extensions;
9764else
9765 enable_loadable_sqlite_extensions="no"
9766fi
9767
9768
9769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9770$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9771
Ned Deilyd819b932013-09-06 01:07:05 -07009772# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9773
9774
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9776$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9777
9778# Check whether --with-tcltk-includes was given.
9779if test "${with_tcltk_includes+set}" = set; then :
9780 withval=$with_tcltk_includes;
9781else
9782 with_tcltk_includes="default"
9783fi
9784
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9786$as_echo "$with_tcltk_includes" >&6; }
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9788$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9789
9790# Check whether --with-tcltk-libs was given.
9791if test "${with_tcltk_libs+set}" = set; then :
9792 withval=$with_tcltk_libs;
9793else
9794 with_tcltk_libs="default"
9795fi
9796
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9798$as_echo "$with_tcltk_libs" >&6; }
9799if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9800then
9801 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9802 then
9803 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9804 fi
9805 TCLTK_INCLUDES=""
9806 TCLTK_LIBS=""
9807else
9808 TCLTK_INCLUDES="$with_tcltk_includes"
9809 TCLTK_LIBS="$with_tcltk_libs"
9810fi
9811
Matthias Klose55708cc2009-04-30 08:06:49 +00009812# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9814$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009815
9816# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009817if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009818 withval=$with_dbmliborder;
9819if test x$with_dbmliborder = xyes
9820then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009821as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009822else
9823 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9824 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9825 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009826 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009827 fi
9828 done
9829fi
9830fi
9831
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9833$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009834
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009835# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009836
9837
Matthias Kloseb9621712010-04-24 17:59:49 +00009838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9839$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009842if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843 withval=$with_signal_module;
9844fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009845
9846
9847if test -z "$with_signal_module"
9848then with_signal_module="yes"
9849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9851$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009852
9853if test "${with_signal_module}" = "yes"; then
9854 USE_SIGNAL_MODULE=""
9855 SIGNAL_OBJS=""
9856else
9857 USE_SIGNAL_MODULE="#"
9858 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9859fi
9860
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009861# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009862
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009863USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866
9867# Templates for things AC_DEFINEd more than once.
9868# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009869
9870
Martin v. Löwis11437992002-04-12 09:54:03 +00009871
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9873$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009876if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877 withval=$with_threads;
9878fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009879
9880
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009881# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009884if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885 withval=$with_thread; with_threads=$with_thread
9886fi
9887
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009888
9889if test -z "$with_threads"
9890then with_threads="yes"
9891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9893$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009894
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009895
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009896if test "$with_threads" = "no"
9897then
9898 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009899elif test "$ac_cv_pthread_is_default" = yes
9900then
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009902
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009903 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009905
9906 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009908elif test "$ac_cv_kpthread" = "yes"
9909then
9910 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009911 if test "$ac_cv_cxx_thread" = "yes"; then
9912 CXX="$CXX -Kpthread"
9913 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009915
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009916 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009917 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009918elif test "$ac_cv_kthread" = "yes"
9919then
9920 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009921 if test "$ac_cv_cxx_thread" = "yes"; then
9922 CXX="$CXX -Kthread"
9923 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009925
9926 posix_threads=yes
9927 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009928elif test "$ac_cv_pthread" = "yes"
9929then
9930 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009931 if test "$ac_cv_cxx_thread" = "yes"; then
9932 CXX="$CXX -pthread"
9933 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009935
9936 posix_threads=yes
9937 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009938else
9939 if test ! -z "$with_threads" -a -d "$with_threads"
9940 then LDFLAGS="$LDFLAGS -L$with_threads"
9941 fi
9942 if test ! -z "$withval" -a -d "$withval"
9943 then LDFLAGS="$LDFLAGS -L$withval"
9944 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009945
9946 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009947 # define _POSIX_THREADS in unistd.h. Some apparently don't
9948 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9950$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009952/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009953
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009954#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009955#ifdef _POSIX_THREADS
9956yes
9957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009958
9959_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009962 unistd_defines_pthreads=yes
9963else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009964 unistd_defines_pthreads=no
9965fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009966rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009967
Matthias Kloseb9621712010-04-24 17:59:49 +00009968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9969$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009970
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009972
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009973 # Just looking for pthread_create in libpthread is not enough:
9974 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9975 # So we really have to include pthread.h, and then link.
9976 _libs=$LIBS
9977 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9979$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009981/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009982
9983#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009984#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009985
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009986void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009987int
9988main ()
9989{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009990
9991pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 ;
9993 return 0;
9994}
9995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009997
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9999$as_echo "yes" >&6; }
10000 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010001
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010002 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010003 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010004else
Martin v. Löwis11437992002-04-12 09:54:03 +000010005
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010006 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010008if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010010
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010011 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010012 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010013else
Guido van Rossumad678af1998-10-02 14:42:15 +000010014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10016$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010017if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010018 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010019else
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010021LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025/* Override any GCC internal prototype to avoid an error.
10026 Use char because int might match the return type of a GCC
10027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010028#ifdef __cplusplus
10029extern "C"
10030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010031char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010032int
10033main ()
10034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010035return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 ;
10037 return 0;
10038}
10039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010040if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010045rm -f core conftest.err conftest.$ac_objext \
10046 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010047LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10050$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010051if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010053
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010054 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010055 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010056 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010057else
Greg Steinadf63d62000-07-05 10:38:09 +000010058
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10060$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010061if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010063else
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010065LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069/* Override any GCC internal prototype to avoid an error.
10070 Use char because int might match the return type of a GCC
10071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010072#ifdef __cplusplus
10073extern "C"
10074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010075char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010076int
10077main ()
10078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010079return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ;
10081 return 0;
10082}
10083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010086else
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010089rm -f core conftest.err conftest.$ac_objext \
10090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010091LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10094$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010095if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010097
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010098 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010099 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010100 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010101else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010102
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10104$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010105if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010107else
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010109LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113/* Override any GCC internal prototype to avoid an error.
10114 Use char because int might match the return type of a GCC
10115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010116#ifdef __cplusplus
10117extern "C"
10118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010119char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010120int
10121main ()
10122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 ;
10125 return 0;
10126}
10127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010130else
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010133rm -f core conftest.err conftest.$ac_objext \
10134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010135LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10138$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010139if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010140 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010141
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010142 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010143 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010144 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010145else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010146
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10148$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010149if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010151else
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010153LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157/* Override any GCC internal prototype to avoid an error.
10158 Use char because int might match the return type of a GCC
10159 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010160#ifdef __cplusplus
10161extern "C"
10162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010163char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010164int
10165main ()
10166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 ;
10169 return 0;
10170}
10171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010172if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010174else
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010177rm -f core conftest.err conftest.$ac_objext \
10178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010179LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10182$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010183if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010185
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010186 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010187 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010188 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010189else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010190
Martin v. Löwis130fb172001-07-19 11:00:41 +000010191 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010192fi
10193
Guido van Rossum627b2d71993-12-24 10:39:16 +000010194
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010195fi
10196
Guido van Rossum0be3e491997-05-22 20:33:33 +000010197fi
10198
Guido van Rossum49545951997-12-02 19:28:29 +000010199fi
10200
Guido van Rossumb93a8621998-05-07 13:27:32 +000010201fi
10202
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204rm -f core conftest.err conftest.$ac_objext \
10205 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010206
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10208$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010209if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010211else
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010213LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217/* Override any GCC internal prototype to avoid an error.
10218 Use char because int might match the return type of a GCC
10219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#ifdef __cplusplus
10221extern "C"
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
10226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010234else
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237rm -f core conftest.err conftest.$ac_objext \
10238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010239LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10242$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010243if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010245
Martin v. Löwis130fb172001-07-19 11:00:41 +000010246 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010247 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010248 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010249fi
10250
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010251
Neal Norwitza978ab02002-11-02 16:58:05 +000010252 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10254$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010255if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010257else
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010259LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263/* Override any GCC internal prototype to avoid an error.
10264 Use char because int might match the return type of a GCC
10265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010266#ifdef __cplusplus
10267extern "C"
10268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010269char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010270int
10271main ()
10272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 ;
10275 return 0;
10276}
10277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010280else
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010283rm -f core conftest.err conftest.$ac_objext \
10284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010285LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10288$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010289if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010291
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010292 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010293 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010294 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010295fi
10296
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010297 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010298fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010299
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010300if test "$posix_threads" = "yes"; then
10301 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010302
Matthias Kloseb9621712010-04-24 17:59:49 +000010303$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010304
10305 fi
10306
10307 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10308 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010309 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010310$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010311
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010312 ;;
10313 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010314$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010315
10316 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010317 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010318$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010319
10320 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010321 esac
10322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10324$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010325 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010329 ac_cv_pthread_system_supported=no
10330else
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010333
10334 #include <stdio.h>
10335 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010336 void *foo(void *parm) {
10337 return NULL;
10338 }
10339 main() {
10340 pthread_attr_t attr;
10341 pthread_t id;
10342 if (pthread_attr_init(&attr)) exit(-1);
10343 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10344 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10345 exit(0);
10346 }
10347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010349 ac_cv_pthread_system_supported=yes
10350else
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10354 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010355fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357
Guido van Rossum627b2d71993-12-24 10:39:16 +000010358fi
10359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10361$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010362 if test "$ac_cv_pthread_system_supported" = "yes"; then
10363
Matthias Kloseb9621712010-04-24 17:59:49 +000010364$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010365
10366 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010367 for ac_func in pthread_sigmask
10368do :
10369 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010370if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010371 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010372#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010373_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010374 case $ac_sys_system in
10375 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010378
10379 ;;
10380 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010381fi
10382done
10383
Christian Heimesf77b4b22013-08-21 13:26:05 +020010384 for ac_func in pthread_atfork
10385do :
10386 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10387if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10388 cat >>confdefs.h <<_ACEOF
10389#define HAVE_PTHREAD_ATFORK 1
10390_ACEOF
10391
10392fi
10393done
10394
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010395fi
10396
10397
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010398# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10401$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010402# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010403if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010405 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10407$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010408 ipv6=no
10409 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010410 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10411$as_echo "yes" >&6; }
10412 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010413
10414 ipv6=yes
10415 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010417else
Martin v. Löwis11437992002-04-12 09:54:03 +000010418
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010421 /* AF_INET6 available check */
10422#include <sys/types.h>
10423#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010424int
10425main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010426{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010427int domain = AF_INET6;
10428 ;
10429 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010430}
Martin v. Löwis11437992002-04-12 09:54:03 +000010431_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010432if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010433
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10435$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010436 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010437
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010438else
Matthias Kloseb159a552010-04-25 21:00:44 +000010439
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010442 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010443
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010444fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010447if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10449$as_echo_n "checking if RFC2553 API is available... " >&6; }
10450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010451/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010452
10453 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010454#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010455int
10456main ()
10457{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010458struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010459 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 ;
10461 return 0;
10462}
Matthias Kloseb159a552010-04-25 21:00:44 +000010463
Martin v. Löwis11437992002-04-12 09:54:03 +000010464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010465if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010466
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010468$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010469 ipv6=yes
10470
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010471else
Matthias Kloseb159a552010-04-25 21:00:44 +000010472
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010474$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010475 ipv6=no
10476
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010479fi
10480
10481if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010483
10484fi
10485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486fi
10487
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010488
10489ipv6type=unknown
10490ipv6lib=none
10491ipv6trylibc=no
10492
10493if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10495$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010496 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10497 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010498 case $i in
10499 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010501/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010502
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010503#include <netinet/in.h>
10504#ifdef IPV6_INRIA_VERSION
10505yes
10506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010507_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010510 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010511fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010512rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010513
10514 ;;
10515 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010517/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010518
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010519#include <netinet/in.h>
10520#ifdef __KAME__
10521yes
10522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010523_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010526 ipv6type=$i;
10527 ipv6lib=inet6
10528 ipv6libdir=/usr/local/v6/lib
10529 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010530fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010531rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010532
10533 ;;
10534 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010536/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010537
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010538#include <features.h>
10539#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10540yes
10541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010542_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010545 ipv6type=$i;
10546 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010547fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010548rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010549
10550 ;;
10551 linux-inet6)
10552 if test -d /usr/inet6; then
10553 ipv6type=$i
10554 ipv6lib=inet6
10555 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010556 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010557 fi
10558 ;;
10559 solaris)
10560 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010561 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010562 ipv6type=$i
10563 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010564 fi
10565 fi
10566 ;;
10567 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010569/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010570
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571#include <sys/param.h>
10572#ifdef _TOSHIBA_INET6
10573yes
10574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010575_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010578 ipv6type=$i;
10579 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010580 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010581fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010582rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010583
10584 ;;
10585 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010587/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010588
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589#include </usr/local/v6/include/sys/v6config.h>
10590#ifdef __V6D__
10591yes
10592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010593_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010596 ipv6type=$i;
10597 ipv6lib=v6;
10598 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010599 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010600fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010601rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010602
10603 ;;
10604 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010606/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010607
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010608#include <sys/param.h>
10609#ifdef _ZETA_MINAMI_INET6
10610yes
10611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010612_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010615 ipv6type=$i;
10616 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010617 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010618fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010619rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010620
10621 ;;
10622 esac
10623 if test "$ipv6type" != "unknown"; then
10624 break
10625 fi
10626 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10628$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010629fi
10630
10631if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10632 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10633 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10634 echo "using lib$ipv6lib"
10635 else
10636 if test $ipv6trylibc = "yes"; then
10637 echo "using libc"
10638 else
10639 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10640 echo "You need to fetch lib$ipv6lib.a from appropriate"
10641 echo 'ipv6 kit and compile beforehand.'
10642 exit 1
10643 fi
10644 fi
10645fi
10646
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10648$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10650/* end confdefs.h. */
10651 /* CAN_RAW_FD_FRAMES available check */
10652#include <linux/can/raw.h>
10653int
10654main ()
10655{
10656int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10657 ;
10658 return 0;
10659}
10660_ACEOF
10661if ac_fn_c_try_compile "$LINENO"; then :
10662
10663
10664$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10665
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10667$as_echo "yes" >&6; }
10668
10669else
10670
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
10673
10674fi
10675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10678$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010680/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010681
10682 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010683int
10684main ()
10685{
10686FSIORefNum fRef = 0
10687 ;
10688 return 0;
10689}
Matthias Kloseb159a552010-04-25 21:00:44 +000010690
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010692if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010693
Matthias Kloseb159a552010-04-25 21:00:44 +000010694
Matthias Kloseb9621712010-04-24 17:59:49 +000010695$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10698$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010699
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010700else
Matthias Kloseb159a552010-04-25 21:00:44 +000010701
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010704
10705fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10707
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010708# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10710$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010713if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714 withval=$with_doc_strings;
10715fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010716
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010717
10718if test -z "$with_doc_strings"
10719then with_doc_strings="yes"
10720fi
10721if test "$with_doc_strings" != "no"
10722then
10723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010725
10726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10728$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010729
Antoine Pitrou042b1282010-08-13 21:15:58 +000010730# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10732$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010735if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010737if test "$withval" != no
10738then
10739
Matthias Kloseb9621712010-04-24 17:59:49 +000010740$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010741
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10743$as_echo "yes" >&6; }
10744else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010746fi
10747else
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10749$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750fi
10751
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010752
10753# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10755$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010758if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759 withval=$with_pymalloc;
10760fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010761
Neil Schemenauera35c6882001-02-27 04:45:05 +000010762
Neil Schemenauer16c22972002-03-22 15:34:49 +000010763if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010764then
10765 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010766fi
10767if test "$with_pymalloc" != "no"
10768then
Martin v. Löwis11437992002-04-12 09:54:03 +000010769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010771
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010772 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10775$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010776
Benjamin Peterson05159c42009-12-03 03:01:27 +000010777# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10779$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010780
10781# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010783 withval=$with_valgrind;
10784else
10785 with_valgrind=no
10786fi
10787
Matthias Kloseb9621712010-04-24 17:59:49 +000010788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10789$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010790if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 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 +020010792if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010793
Matthias Kloseb9621712010-04-24 17:59:49 +000010794$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010795
10796else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010797 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010798
10799fi
10800
10801
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010802 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010803fi
10804
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010805# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010806
Guido van Rossum98935bf2001-09-05 19:13:16 +000010807DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010808
Guido van Rossume97ee181999-12-20 21:27:22 +000010809# the dlopen() function means we might want to use dynload_shlib.o. some
10810# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010811for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010812do :
10813 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010814if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010816#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010817_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010818
Guido van Rossume97ee181999-12-20 21:27:22 +000010819fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010820done
Guido van Rossume97ee181999-12-20 21:27:22 +000010821
Michael W. Hudson54241132001-12-07 15:38:26 +000010822
Guido van Rossume97ee181999-12-20 21:27:22 +000010823# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10824# loading of modules.
10825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10827$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010828if test -z "$DYNLOADFILE"
10829then
10830 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010831 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10832 if test "$ac_cv_func_dlopen" = yes
10833 then DYNLOADFILE="dynload_shlib.o"
10834 else DYNLOADFILE="dynload_aix.o"
10835 fi
10836 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010837 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010838 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10839 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010840 *)
10841 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10842 # out any dynamic loading
10843 if test "$ac_cv_func_dlopen" = yes
10844 then DYNLOADFILE="dynload_shlib.o"
10845 else DYNLOADFILE="dynload_stub.o"
10846 fi
10847 ;;
10848 esac
10849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10851$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010852if test "$DYNLOADFILE" != "dynload_stub.o"
10853then
Martin v. Löwis11437992002-04-12 09:54:03 +000010854
Matthias Kloseb9621712010-04-24 17:59:49 +000010855$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010856
10857fi
10858
Neil Schemenauer4e425612001-06-19 15:44:15 +000010859# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10860
Michael W. Hudson54241132001-12-07 15:38:26 +000010861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10863$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010864if test -z "$MACHDEP_OBJS"
10865then
Jack Jansene578a632001-08-15 01:27:14 +000010866 MACHDEP_OBJS=$extra_machdep_objs
10867else
10868 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010869fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010870if test -z "$MACHDEP_OBJS"; then
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10872$as_echo "none" >&6; }
10873else
10874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10875$as_echo "$MACHDEP_OBJS" >&6; }
10876fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010877
Guido van Rossum627b2d71993-12-24 10:39:16 +000010878# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010879for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010880 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010881 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010882 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010883 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010884 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010885 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010886 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10887 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010888 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010889 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010890 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010891 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010892 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010893 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010894 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10895 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010896 sigaction sigaltstack siginterrupt sigpending sigrelse \
10897 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010898 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010899 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010900 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010901do :
10902 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10903ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010904if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010906#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010907_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010908
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010909fi
10910done
10911
Michael W. Hudson54241132001-12-07 15:38:26 +000010912
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010913ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10914 #include <dirent.h>
10915"
10916if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10917
10918$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10919
10920fi
10921
10922
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010923# For some functions, having a definition is not sufficient, since
10924# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10926$as_echo_n "checking for chroot... " >&6; }
10927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010928/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010929#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010930int
10931main ()
10932{
10933void *x=chroot
10934 ;
10935 return 0;
10936}
10937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010938if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010939
Matthias Kloseb9621712010-04-24 17:59:49 +000010940$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010941
Matthias Kloseb159a552010-04-25 21:00:44 +000010942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010944else
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10946$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010947
10948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10951$as_echo_n "checking for link... " >&6; }
10952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010953/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010954#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010955int
10956main ()
10957{
10958void *x=link
10959 ;
10960 return 0;
10961}
10962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010966
Matthias Kloseb159a552010-04-25 21:00:44 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010968$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010972
10973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10976$as_echo_n "checking for symlink... " >&6; }
10977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010978/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010979#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010980int
10981main ()
10982{
10983void *x=symlink
10984 ;
10985 return 0;
10986}
10987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010988if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010991
Matthias Kloseb159a552010-04-25 21:00:44 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010994else
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010997
10998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11001$as_echo_n "checking for fchdir... " >&6; }
11002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011004#include <unistd.h>
11005int
11006main ()
11007{
11008void *x=fchdir
11009 ;
11010 return 0;
11011}
11012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011016
Matthias Kloseb159a552010-04-25 21:00:44 +000011017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11021$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011022
11023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11026$as_echo_n "checking for fsync... " >&6; }
11027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011028/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011029#include <unistd.h>
11030int
11031main ()
11032{
11033void *x=fsync
11034 ;
11035 return 0;
11036}
11037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011039
Matthias Kloseb9621712010-04-24 17:59:49 +000011040$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011041
Matthias Kloseb159a552010-04-25 21:00:44 +000011042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011043$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011044else
Matthias Kloseb9621712010-04-24 17:59:49 +000011045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11046$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011047
11048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11051$as_echo_n "checking for fdatasync... " >&6; }
11052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011053/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011054#include <unistd.h>
11055int
11056main ()
11057{
11058void *x=fdatasync
11059 ;
11060 return 0;
11061}
11062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011063if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011064
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011066
Matthias Kloseb159a552010-04-25 21:00:44 +000011067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011068$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011069else
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11071$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011072
11073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11076$as_echo_n "checking for epoll... " >&6; }
11077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011078/* end confdefs.h. */
11079#include <sys/epoll.h>
11080int
11081main ()
11082{
11083void *x=epoll_create
11084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011091
Matthias Kloseb159a552010-04-25 21:00:44 +000011092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011093$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011094else
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11096$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011097
11098fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11101$as_echo_n "checking for epoll_create1... " >&6; }
11102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11103/* end confdefs.h. */
11104#include <sys/epoll.h>
11105int
11106main ()
11107{
11108void *x=epoll_create1
11109 ;
11110 return 0;
11111}
11112_ACEOF
11113if ac_fn_c_try_compile "$LINENO"; then :
11114
11115$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11116
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11118$as_echo "yes" >&6; }
11119else
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11121$as_echo "no" >&6; }
11122
11123fi
11124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11126$as_echo_n "checking for kqueue... " >&6; }
11127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011128/* end confdefs.h. */
11129
11130#include <sys/types.h>
11131#include <sys/event.h>
11132
11133int
11134main ()
11135{
11136int x=kqueue()
11137 ;
11138 return 0;
11139}
11140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011141if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011142
Matthias Kloseb9621712010-04-24 17:59:49 +000011143$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011144
Matthias Kloseb159a552010-04-25 21:00:44 +000011145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011146$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011147else
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011150
11151fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11154$as_echo_n "checking for prlimit... " >&6; }
11155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11156/* end confdefs.h. */
11157
11158#include <sys/time.h>
11159#include <sys/resource.h>
11160
11161int
11162main ()
11163{
11164void *x=prlimit
11165 ;
11166 return 0;
11167}
11168_ACEOF
11169if ac_fn_c_try_compile "$LINENO"; then :
11170
11171$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11172
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11174$as_echo "yes" >&6; }
11175else
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11177$as_echo "no" >&6; }
11178
11179fi
11180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11181
Martin v. Löwisd5843682002-11-21 20:41:28 +000011182# On some systems (eg. FreeBSD 5), we would find a definition of the
11183# functions ctermid_r, setgroups in the library, but no prototype
11184# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11185# address to avoid compiler warnings and potential miscompilations
11186# because of the missing prototypes.
11187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11189$as_echo_n "checking for ctermid_r... " >&6; }
11190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011191/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011192
Martin v. Löwisd5843682002-11-21 20:41:28 +000011193#include <stdio.h>
11194
Martin v. Löwisd5843682002-11-21 20:41:28 +000011195int
11196main ()
11197{
11198void* p = ctermid_r
11199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011206
Matthias Kloseb159a552010-04-25 21:00:44 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011208$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011209else
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011212
11213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11215
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11217$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011218if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011219 $as_echo_n "(cached) " >&6
11220else
11221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011222/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011223#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011224int
11225main ()
11226{
11227void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011228
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011229 ;
11230 return 0;
11231}
11232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011233if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011234 ac_cv_flock_decl=yes
11235else
11236 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011237
11238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011240
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011241fi
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11243$as_echo "$ac_cv_flock_decl" >&6; }
11244if test "x${ac_cv_flock_decl}" = xyes; then
11245 for ac_func in flock
11246do :
11247 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011248if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011249 cat >>confdefs.h <<_ACEOF
11250#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011251_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011252
Antoine Pitroua3000072010-09-07 14:52:42 +000011253else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011255$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011256if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011257 $as_echo_n "(cached) " >&6
11258else
11259 ac_check_lib_save_LIBS=$LIBS
11260LIBS="-lbsd $LIBS"
11261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11262/* end confdefs.h. */
11263
11264/* Override any GCC internal prototype to avoid an error.
11265 Use char because int might match the return type of a GCC
11266 builtin and then its argument prototype would still apply. */
11267#ifdef __cplusplus
11268extern "C"
11269#endif
11270char flock ();
11271int
11272main ()
11273{
11274return flock ();
11275 ;
11276 return 0;
11277}
11278_ACEOF
11279if ac_fn_c_try_link "$LINENO"; then :
11280 ac_cv_lib_bsd_flock=yes
11281else
11282 ac_cv_lib_bsd_flock=no
11283fi
11284rm -f core conftest.err conftest.$ac_objext \
11285 conftest$ac_exeext conftest.$ac_ext
11286LIBS=$ac_check_lib_save_LIBS
11287fi
11288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11289$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011290if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011291 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011292
11293
11294$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11295
11296
11297fi
11298
11299
11300fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011301done
11302
Antoine Pitroua3000072010-09-07 14:52:42 +000011303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11306$as_echo_n "checking for getpagesize... " >&6; }
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011309
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011310#include <unistd.h>
11311
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011312int
11313main ()
11314{
11315void* p = getpagesize
11316 ;
11317 return 0;
11318}
11319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011323
Matthias Kloseb159a552010-04-25 21:00:44 +000011324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011325$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011326else
Matthias Kloseb9621712010-04-24 17:59:49 +000011327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11328$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011329
11330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011332
Victor Stinner984890f2011-11-24 13:53:38 +010011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11334$as_echo_n "checking for broken unsetenv... " >&6; }
11335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11336/* end confdefs.h. */
11337
11338#include <stdlib.h>
11339
11340int
11341main ()
11342{
11343int res = unsetenv("DUMMY")
11344 ;
11345 return 0;
11346}
11347_ACEOF
11348if ac_fn_c_try_compile "$LINENO"; then :
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
11351else
11352
11353$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11354
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11356$as_echo "yes" >&6; }
11357
11358fi
11359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11360
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011361for ac_prog in true
11362do
11363 # Extract the first word of "$ac_prog", so it can be a program name with args.
11364set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11366$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011367if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011369else
11370 if test -n "$TRUE"; then
11371 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11372else
11373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11374for as_dir in $PATH
11375do
11376 IFS=$as_save_IFS
11377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011379 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011380 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 $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 +000011382 break 2
11383 fi
11384done
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011387
11388fi
11389fi
11390TRUE=$ac_cv_prog_TRUE
11391if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11393$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011394else
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011397fi
11398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011400 test -n "$TRUE" && break
11401done
11402test -n "$TRUE" || TRUE="/bin/true"
11403
11404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11406$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011407if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011409else
11410 ac_check_lib_save_LIBS=$LIBS
11411LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011415/* Override any GCC internal prototype to avoid an error.
11416 Use char because int might match the return type of a GCC
11417 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011418#ifdef __cplusplus
11419extern "C"
11420#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011421char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011422int
11423main ()
11424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011426 ;
11427 return 0;
11428}
11429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011431 ac_cv_lib_c_inet_aton=yes
11432else
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011435rm -f core conftest.err conftest.$ac_objext \
11436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011437LIBS=$ac_check_lib_save_LIBS
11438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11440$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011441if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011442 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011443else
Matthias Kloseb9621712010-04-24 17:59:49 +000011444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11445$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011446if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011448else
11449 ac_check_lib_save_LIBS=$LIBS
11450LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011452/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454/* Override any GCC internal prototype to avoid an error.
11455 Use char because int might match the return type of a GCC
11456 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011457#ifdef __cplusplus
11458extern "C"
11459#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011460char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011461int
11462main ()
11463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011465 ;
11466 return 0;
11467}
11468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011470 ac_cv_lib_resolv_inet_aton=yes
11471else
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011474rm -f core conftest.err conftest.$ac_objext \
11475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011476LIBS=$ac_check_lib_save_LIBS
11477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11479$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011480if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011481 cat >>confdefs.h <<_ACEOF
11482#define HAVE_LIBRESOLV 1
11483_ACEOF
11484
11485 LIBS="-lresolv $LIBS"
11486
11487fi
11488
11489
11490fi
11491
11492
Christian Heimesd0764e22007-12-04 15:00:33 +000011493# On Tru64, chflags seems to be present, but calling it will
11494# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11496$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011497if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011498 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011499else
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011501 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011502else
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011504/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011505
Christian Heimesd0764e22007-12-04 15:00:33 +000011506#include <sys/stat.h>
11507#include <unistd.h>
11508int main(int argc, char*argv[])
11509{
11510 if(chflags(argv[0], 0) != 0)
11511 return 1;
11512 return 0;
11513}
Ned Deily3eb67d52011-06-28 00:00:28 -070011514
Christian Heimesd0764e22007-12-04 15:00:33 +000011515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011516if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011517 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011518else
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11522 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011523fi
11524
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011525
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11528$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011529if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011531if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011532 ac_cv_have_chflags="yes"
11533else
11534 ac_cv_have_chflags="no"
11535fi
11536
11537fi
11538if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011541
11542fi
11543
Matthias Kloseb9621712010-04-24 17:59:49 +000011544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11545$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011546if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011550 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011551else
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011553/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011554
Christian Heimesd0764e22007-12-04 15:00:33 +000011555#include <sys/stat.h>
11556#include <unistd.h>
11557int main(int argc, char*argv[])
11558{
11559 if(lchflags(argv[0], 0) != 0)
11560 return 1;
11561 return 0;
11562}
Ned Deily3eb67d52011-06-28 00:00:28 -070011563
Christian Heimesd0764e22007-12-04 15:00:33 +000011564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011565if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011566 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011567else
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011572fi
11573
11574
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11577$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011578if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011580if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011581 ac_cv_have_lchflags="yes"
11582else
11583 ac_cv_have_lchflags="no"
11584fi
11585
11586fi
11587if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011590
11591fi
11592
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011593case $ac_sys_system/$ac_sys_release in
11594Darwin/*)
11595 _CUR_CFLAGS="${CFLAGS}"
11596 _CUR_LDFLAGS="${LDFLAGS}"
11597 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11598 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11599 ;;
11600esac
11601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11603$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011604if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011606else
11607 ac_check_lib_save_LIBS=$LIBS
11608LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011610/* end confdefs.h. */
11611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612/* Override any GCC internal prototype to avoid an error.
11613 Use char because int might match the return type of a GCC
11614 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011615#ifdef __cplusplus
11616extern "C"
11617#endif
11618char inflateCopy ();
11619int
11620main ()
11621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011622return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011623 ;
11624 return 0;
11625}
11626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011628 ac_cv_lib_z_inflateCopy=yes
11629else
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011632rm -f core conftest.err conftest.$ac_objext \
11633 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011634LIBS=$ac_check_lib_save_LIBS
11635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11637$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011638if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011641
11642fi
11643
11644
11645case $ac_sys_system/$ac_sys_release in
11646Darwin/*)
11647 CFLAGS="${_CUR_CFLAGS}"
11648 LDFLAGS="${_CUR_LDFLAGS}"
11649 ;;
11650esac
11651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11653$as_echo_n "checking for hstrerror... " >&6; }
11654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011655/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011656
Martin v. Löwise9416172003-05-03 10:12:45 +000011657#include <netdb.h>
11658
Martin v. Löwise9416172003-05-03 10:12:45 +000011659int
11660main ()
11661{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011662void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011663 ;
11664 return 0;
11665}
11666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011670
Matthias Kloseb159a552010-04-25 21:00:44 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011672$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011676
11677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011678rm -f core conftest.err conftest.$ac_objext \
11679 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11682$as_echo_n "checking for inet_aton... " >&6; }
11683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011684/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011685
Martin v. Löwis86d66262006-02-17 08:40:11 +000011686#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011687#include <sys/socket.h>
11688#include <netinet/in.h>
11689#include <arpa/inet.h>
11690
Martin v. Löwise9416172003-05-03 10:12:45 +000011691int
11692main ()
11693{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011694void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011695 ;
11696 return 0;
11697}
11698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011699if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011702
Matthias Kloseb159a552010-04-25 21:00:44 +000011703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011704$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11707$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011708
11709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011710rm -f core conftest.err conftest.$ac_objext \
11711 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11714$as_echo_n "checking for inet_pton... " >&6; }
11715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011716/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011717
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011718#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011719#include <sys/socket.h>
11720#include <netinet/in.h>
11721#include <arpa/inet.h>
11722
Martin v. Löwise9416172003-05-03 10:12:45 +000011723int
11724main ()
11725{
11726void* p = inet_pton
11727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011734
Matthias Kloseb159a552010-04-25 21:00:44 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011740
11741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011743
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011744# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11746$as_echo_n "checking for setgroups... " >&6; }
11747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011748/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011749
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011750#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011751#ifdef HAVE_GRP_H
11752#include <grp.h>
11753#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011754
Martin v. Löwisd5843682002-11-21 20:41:28 +000011755int
11756main ()
11757{
11758void* p = setgroups
11759 ;
11760 return 0;
11761}
11762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011764
Matthias Kloseb9621712010-04-24 17:59:49 +000011765$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011766
Matthias Kloseb159a552010-04-25 21:00:44 +000011767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011768$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011772
11773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011775
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011776# check for openpty and forkpty
11777
11778for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011779do :
11780 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011781if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011783#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011784_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011785
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11788$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011789if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011791else
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011793LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011797/* Override any GCC internal prototype to avoid an error.
11798 Use char because int might match the return type of a GCC
11799 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011800#ifdef __cplusplus
11801extern "C"
11802#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011803char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011804int
11805main ()
11806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011807return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 ;
11809 return 0;
11810}
11811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011813 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011817rm -f core conftest.err conftest.$ac_objext \
11818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011819LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11822$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011823if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011825 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11828$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011829if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011831else
11832 ac_check_lib_save_LIBS=$LIBS
11833LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011835/* end confdefs.h. */
11836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837/* Override any GCC internal prototype to avoid an error.
11838 Use char because int might match the return type of a GCC
11839 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011840#ifdef __cplusplus
11841extern "C"
11842#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011843char openpty ();
11844int
11845main ()
11846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011848 ;
11849 return 0;
11850}
11851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011853 ac_cv_lib_bsd_openpty=yes
11854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011857rm -f core conftest.err conftest.$ac_objext \
11858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011859LIBS=$ac_check_lib_save_LIBS
11860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11862$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011865 LIBS="$LIBS -lbsd"
11866fi
11867
11868
11869fi
11870
Fred Drake8cef4cf2000-06-28 16:40:38 +000011871
11872fi
11873done
11874
11875for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011876do :
11877 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011878if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011879 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011881_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011882
Fred Drake8cef4cf2000-06-28 16:40:38 +000011883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11885$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011888else
Martin v. Löwis11437992002-04-12 09:54:03 +000011889 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011890LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011894/* Override any GCC internal prototype to avoid an error.
11895 Use char because int might match the return type of a GCC
11896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011897#ifdef __cplusplus
11898extern "C"
11899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011900char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011901int
11902main ()
11903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011905 ;
11906 return 0;
11907}
11908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011911else
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011914rm -f core conftest.err conftest.$ac_objext \
11915 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011916LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11919$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011920if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011922 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011923else
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11925$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011926if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011928else
11929 ac_check_lib_save_LIBS=$LIBS
11930LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011932/* end confdefs.h. */
11933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011934/* Override any GCC internal prototype to avoid an error.
11935 Use char because int might match the return type of a GCC
11936 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011937#ifdef __cplusplus
11938extern "C"
11939#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011940char forkpty ();
11941int
11942main ()
11943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011944return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011945 ;
11946 return 0;
11947}
11948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011950 ac_cv_lib_bsd_forkpty=yes
11951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011954rm -f core conftest.err conftest.$ac_objext \
11955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011956LIBS=$ac_check_lib_save_LIBS
11957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11959$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011960if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011962 LIBS="$LIBS -lbsd"
11963fi
11964
11965
11966fi
11967
Fred Drake8cef4cf2000-06-28 16:40:38 +000011968
11969fi
11970done
11971
Jack Jansendd19cf82001-12-06 22:36:17 +000011972
Christian Heimesb186d002008-03-18 15:15:01 +000011973# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011974for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011975do :
11976 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011977if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011978 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011979#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011980_ACEOF
11981
11982fi
11983done
11984
11985
Michael W. Hudson54241132001-12-07 15:38:26 +000011986# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011987for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011988do :
11989 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11990ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011991if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011993#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011994_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011995
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011996fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011997done
11998
Michael W. Hudson54241132001-12-07 15:38:26 +000011999
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012000ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012001if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012002 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012003
Martin v. Löwis1142de32002-03-29 16:28:31 +000012004else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012005 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012006 *" dup2.$ac_objext "* ) ;;
12007 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012008 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012009esac
12010
Martin v. Löwis1142de32002-03-29 16:28:31 +000012011fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012012
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012013ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012014if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012015 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12016
12017else
12018 case " $LIBOBJS " in
12019 *" strdup.$ac_objext "* ) ;;
12020 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12021 ;;
12022esac
12023
12024fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012025
12026
12027for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012028do :
12029 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012030if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012032#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012035/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012036#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012037int
12038main ()
12039{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012040getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 ;
12042 return 0;
12043}
12044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012045if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012046
Matthias Kloseb9621712010-04-24 17:59:49 +000012047$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012048
Guido van Rossum627b2d71993-12-24 10:39:16 +000012049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012051
Guido van Rossum627b2d71993-12-24 10:39:16 +000012052fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012053done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012054
Jack Jansen150753c2003-03-29 22:07:47 +000012055for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012056do :
12057 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012058if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012059 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012060#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012064#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012065int
12066main ()
12067{
12068setpgrp(0,0);
12069 ;
12070 return 0;
12071}
12072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012073if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012076
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012079
12080fi
12081done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012082
Thomas Wouters3a584202000-08-05 23:28:51 +000012083for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012084do :
12085 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012088#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012091/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012092#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012093int
12094main ()
12095{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012096gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 ;
12098 return 0;
12099}
12100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012101if ac_fn_c_try_compile "$LINENO"; then :
12102
Guido van Rossum627b2d71993-12-24 10:39:16 +000012103else
Skip Montanaro6dead952003-09-25 14:50:04 +000012104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012106
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
Guido van Rossum627b2d71993-12-24 10:39:16 +000012108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012110
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012111fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012112done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012113
Michael W. Hudson54241132001-12-07 15:38:26 +000012114
Victor Stinnere0be4232011-10-25 13:06:09 +020012115for ac_func in clock_gettime
12116do :
12117 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12118if test "x$ac_cv_func_clock_gettime" = xyes; then :
12119 cat >>confdefs.h <<_ACEOF
12120#define HAVE_CLOCK_GETTIME 1
12121_ACEOF
12122
12123else
12124
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12126$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12127if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12128 $as_echo_n "(cached) " >&6
12129else
12130 ac_check_lib_save_LIBS=$LIBS
12131LIBS="-lrt $LIBS"
12132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12133/* end confdefs.h. */
12134
12135/* Override any GCC internal prototype to avoid an error.
12136 Use char because int might match the return type of a GCC
12137 builtin and then its argument prototype would still apply. */
12138#ifdef __cplusplus
12139extern "C"
12140#endif
12141char clock_gettime ();
12142int
12143main ()
12144{
12145return clock_gettime ();
12146 ;
12147 return 0;
12148}
12149_ACEOF
12150if ac_fn_c_try_link "$LINENO"; then :
12151 ac_cv_lib_rt_clock_gettime=yes
12152else
12153 ac_cv_lib_rt_clock_gettime=no
12154fi
12155rm -f core conftest.err conftest.$ac_objext \
12156 conftest$ac_exeext conftest.$ac_ext
12157LIBS=$ac_check_lib_save_LIBS
12158fi
12159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12160$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12161if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12162
Victor Stinner7efb8332014-08-29 15:41:08 +020012163 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012164 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12165
12166
12167$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12168
12169
12170fi
12171
12172
12173fi
12174done
12175
12176
12177for ac_func in clock_getres
12178do :
12179 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12180if test "x$ac_cv_func_clock_getres" = xyes; then :
12181 cat >>confdefs.h <<_ACEOF
12182#define HAVE_CLOCK_GETRES 1
12183_ACEOF
12184
12185else
12186
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12188$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12189if ${ac_cv_lib_rt_clock_getres+:} false; then :
12190 $as_echo_n "(cached) " >&6
12191else
12192 ac_check_lib_save_LIBS=$LIBS
12193LIBS="-lrt $LIBS"
12194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195/* end confdefs.h. */
12196
12197/* Override any GCC internal prototype to avoid an error.
12198 Use char because int might match the return type of a GCC
12199 builtin and then its argument prototype would still apply. */
12200#ifdef __cplusplus
12201extern "C"
12202#endif
12203char clock_getres ();
12204int
12205main ()
12206{
12207return clock_getres ();
12208 ;
12209 return 0;
12210}
12211_ACEOF
12212if ac_fn_c_try_link "$LINENO"; then :
12213 ac_cv_lib_rt_clock_getres=yes
12214else
12215 ac_cv_lib_rt_clock_getres=no
12216fi
12217rm -f core conftest.err conftest.$ac_objext \
12218 conftest$ac_exeext conftest.$ac_ext
12219LIBS=$ac_check_lib_save_LIBS
12220fi
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12222$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12223if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12224
12225 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12226
12227
12228fi
12229
12230
12231fi
12232done
12233
12234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12236$as_echo_n "checking for major... " >&6; }
12237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012238/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012239
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012240#if defined(MAJOR_IN_MKDEV)
12241#include <sys/mkdev.h>
12242#elif defined(MAJOR_IN_SYSMACROS)
12243#include <sys/sysmacros.h>
12244#else
12245#include <sys/types.h>
12246#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012247
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012248int
12249main ()
12250{
12251
12252 makedev(major(0),minor(0));
12253
12254 ;
12255 return 0;
12256}
12257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012258if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012259
12260
Matthias Kloseb9621712010-04-24 17:59:49 +000012261$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12264$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012265
12266else
Skip Montanaro6dead952003-09-25 14:50:04 +000012267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12269$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012270
12271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012272rm -f core conftest.err conftest.$ac_objext \
12273 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012274
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012275# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012276# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12278$as_echo_n "checking for getaddrinfo... " >&6; }
12279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012280/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012281
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012282#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012283#include <sys/socket.h>
12284#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012285#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287int
12288main ()
12289{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012290getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012296 have_getaddrinfo=yes
12297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012300rm -f core conftest.err conftest.$ac_objext \
12301 conftest$ac_exeext conftest.$ac_ext
12302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12303$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012304if test $have_getaddrinfo = yes
12305then
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12307$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012308 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012312
12313if test "${enable_ipv6+set}" = set; then
12314 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12315else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012316 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012317fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012318else
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012320/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012321
Stefan Krah19c21392012-11-22 23:47:32 +010012322#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012323#include <sys/types.h>
12324#include <netdb.h>
12325#include <string.h>
12326#include <sys/socket.h>
12327#include <netinet/in.h>
12328
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012329int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012330{
12331 int passive, gaierr, inet4 = 0, inet6 = 0;
12332 struct addrinfo hints, *ai, *aitop;
12333 char straddr[INET6_ADDRSTRLEN], strport[16];
12334
12335 for (passive = 0; passive <= 1; passive++) {
12336 memset(&hints, 0, sizeof(hints));
12337 hints.ai_family = AF_UNSPEC;
12338 hints.ai_flags = passive ? AI_PASSIVE : 0;
12339 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012340 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012341 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12342 (void)gai_strerror(gaierr);
12343 goto bad;
12344 }
12345 for (ai = aitop; ai; ai = ai->ai_next) {
12346 if (ai->ai_addr == NULL ||
12347 ai->ai_addrlen == 0 ||
12348 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12349 straddr, sizeof(straddr), strport, sizeof(strport),
12350 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12351 goto bad;
12352 }
12353 switch (ai->ai_family) {
12354 case AF_INET:
12355 if (strcmp(strport, "54321") != 0) {
12356 goto bad;
12357 }
12358 if (passive) {
12359 if (strcmp(straddr, "0.0.0.0") != 0) {
12360 goto bad;
12361 }
12362 } else {
12363 if (strcmp(straddr, "127.0.0.1") != 0) {
12364 goto bad;
12365 }
12366 }
12367 inet4++;
12368 break;
12369 case AF_INET6:
12370 if (strcmp(strport, "54321") != 0) {
12371 goto bad;
12372 }
12373 if (passive) {
12374 if (strcmp(straddr, "::") != 0) {
12375 goto bad;
12376 }
12377 } else {
12378 if (strcmp(straddr, "::1") != 0) {
12379 goto bad;
12380 }
12381 }
12382 inet6++;
12383 break;
12384 case AF_UNSPEC:
12385 goto bad;
12386 break;
12387 default:
12388 /* another family support? */
12389 break;
12390 }
12391 }
12392 }
12393
12394 if (!(inet4 == 0 || inet4 == 2))
12395 goto bad;
12396 if (!(inet6 == 0 || inet6 == 2))
12397 goto bad;
12398
12399 if (aitop)
12400 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012401 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402
12403 bad:
12404 if (aitop)
12405 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012406 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012407}
12408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012410if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012411 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012412else
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012419fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012420
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12424$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12425
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012426if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012427then
12428 if test $ipv6 = yes
12429 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012430 echo 'Fatal: You must get working getaddrinfo() function.'
12431 echo ' or you can specify "--disable-ipv6"'.
12432 exit 1
12433 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012434else
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012437
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012438fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012439
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012440for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012441do :
12442 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012443if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012445#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012446_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012447
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012448fi
12449done
12450
Michael W. Hudson54241132001-12-07 15:38:26 +000012451
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012452# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12454$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012455if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012459/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460#include <sys/types.h>
12461#include <sys/time.h>
12462#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012463
Martin v. Löwis11437992002-04-12 09:54:03 +000012464int
12465main ()
12466{
12467if ((struct tm *) 0)
12468return 0;
12469 ;
12470 return 0;
12471}
12472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012473if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012475else
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12481$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012482if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012485
12486fi
12487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12489$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012490if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492else
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012494/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012495#include <sys/types.h>
12496#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501struct tm tm;
12502 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 ;
12505 return 0;
12506}
12507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012508if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012509 ac_cv_struct_tm=time.h
12510else
Matthias Kloseb9621712010-04-24 17:59:49 +000012511 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12516$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012517if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
Matthias Kloseb9621712010-04-24 17:59:49 +000012519$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012520
12521fi
12522
Matthias Kloseb9621712010-04-24 17:59:49 +000012523ac_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 +000012524#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526"
Victor Stinnere0be4232011-10-25 13:06:09 +020012527if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012528
12529cat >>confdefs.h <<_ACEOF
12530#define HAVE_STRUCT_TM_TM_ZONE 1
12531_ACEOF
12532
12533
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012534fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012535
Martin v. Löwis11437992002-04-12 09:54:03 +000012536if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012539
12540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12542"
Victor Stinnere0be4232011-10-25 13:06:09 +020012543if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545else
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547fi
12548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012549cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012550#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551_ACEOF
12552
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12554$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012555if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012557else
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012559/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012560#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012561#if !HAVE_DECL_TZNAME
12562extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012564
Martin v. Löwis11437992002-04-12 09:54:03 +000012565int
12566main ()
12567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 ;
12570 return 0;
12571}
12572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012573if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012574 ac_cv_var_tzname=yes
12575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12582$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012583 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012584
Matthias Kloseb9621712010-04-24 17:59:49 +000012585$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012587 fi
12588fi
12589
Matthias Kloseb9621712010-04-24 17:59:49 +000012590ac_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 +020012591if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
12593cat >>confdefs.h <<_ACEOF
12594#define HAVE_STRUCT_STAT_ST_RDEV 1
12595_ACEOF
12596
12597
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012598fi
12599
Matthias Kloseb9621712010-04-24 17:59:49 +000012600ac_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 +020012601if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012602
Martin v. Löwis11437992002-04-12 09:54:03 +000012603cat >>confdefs.h <<_ACEOF
12604#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12605_ACEOF
12606
12607
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012608fi
12609
Matthias Kloseb9621712010-04-24 17:59:49 +000012610ac_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 +020012611if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012612
12613cat >>confdefs.h <<_ACEOF
12614#define HAVE_STRUCT_STAT_ST_FLAGS 1
12615_ACEOF
12616
12617
12618fi
12619
Matthias Kloseb9621712010-04-24 17:59:49 +000012620ac_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 +020012621if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012622
12623cat >>confdefs.h <<_ACEOF
12624#define HAVE_STRUCT_STAT_ST_GEN 1
12625_ACEOF
12626
12627
12628fi
12629
Matthias Kloseb9621712010-04-24 17:59:49 +000012630ac_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 +020012631if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012632
12633cat >>confdefs.h <<_ACEOF
12634#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12635_ACEOF
12636
12637
12638fi
12639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640ac_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 +020012641if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012642
Martin v. Löwis11437992002-04-12 09:54:03 +000012643cat >>confdefs.h <<_ACEOF
12644#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12645_ACEOF
12646
12647
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012648fi
12649
Stefan Krah267b6392016-04-26 01:09:18 +020012650ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12651 #include <sys/types.h>
12652 #include <pwd.h>
12653
12654"
12655if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12656
12657cat >>confdefs.h <<_ACEOF
12658#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12659_ACEOF
12660
12661
12662fi
12663ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12664 #include <sys/types.h>
12665 #include <pwd.h>
12666
12667"
12668if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12669
12670cat >>confdefs.h <<_ACEOF
12671#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12672_ACEOF
12673
12674
12675fi
12676
Michael W. Hudson54241132001-12-07 15:38:26 +000012677
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12679$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012680if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012682else
Matthias Kloseb159a552010-04-25 21:00:44 +000012683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012685/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012686#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012687int
12688main ()
12689{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012690return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 ;
12692 return 0;
12693}
12694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012696 ac_cv_header_time_altzone=yes
12697else
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702fi
12703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12705$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709
12710fi
12711
Guido van Rossumda88dad1995-01-26 00:46:29 +000012712was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12714$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012716/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717
12718#include <sys/types.h>
12719#include <sys/select.h>
12720#include <sys/time.h>
12721
Martin v. Löwis11437992002-04-12 09:54:03 +000012722int
12723main ()
12724{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725;
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ;
12727 return 0;
12728}
12729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012730if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012735 was_it_defined=yes
12736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12740$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741
Matthias Kloseb9621712010-04-24 17:59:49 +000012742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12743$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012744if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012746else
Matthias Kloseb9621712010-04-24 17:59:49 +000012747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012748/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012749#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012750int
12751main ()
12752{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012753struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 ;
12755 return 0;
12756}
12757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012758if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012759 ac_cv_struct_addrinfo=yes
12760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12764fi
12765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12767$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012768if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012771
12772fi
12773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12775$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012776if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012778else
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012781
12782# include <sys/types.h>
12783# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012784int
12785main ()
12786{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012787struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 ;
12789 return 0;
12790}
12791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012792if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793 ac_cv_struct_sockaddr_storage=yes
12794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12798fi
12799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12801$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012802if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012803
Matthias Kloseb9621712010-04-24 17:59:49 +000012804$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012805
12806fi
12807
Christian Heimesdffa3942016-09-05 23:54:41 +020012808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12809$as_echo_n "checking for sockaddr_alg... " >&6; }
12810if ${ac_cv_struct_sockaddr_alg+:} false; then :
12811 $as_echo_n "(cached) " >&6
12812else
12813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12814/* end confdefs.h. */
12815
12816# include <sys/types.h>
12817# include <sys/socket.h>
12818# include <linux/if_alg.h>
12819int
12820main ()
12821{
12822struct sockaddr_alg s
12823 ;
12824 return 0;
12825}
12826_ACEOF
12827if ac_fn_c_try_compile "$LINENO"; then :
12828 ac_cv_struct_sockaddr_alg=yes
12829else
12830 ac_cv_struct_sockaddr_alg=no
12831fi
12832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12833fi
12834
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12836$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12837if test $ac_cv_struct_sockaddr_alg = yes; then
12838
12839$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12840
12841fi
12842
Guido van Rossum627b2d71993-12-24 10:39:16 +000012843# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12846$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012847if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012849else
Matthias Kloseb9621712010-04-24 17:59:49 +000012850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012852$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012853int
12854main ()
12855{
12856static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012857test_array [0] = 0;
12858return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012859
12860 ;
12861 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012862}
Martin v. Löwis11437992002-04-12 09:54:03 +000012863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012864if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012865 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012866else
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12872$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012875
12876fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012877
Matthias Kloseb9621712010-04-24 17:59:49 +000012878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12879$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012880if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012882else
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012884/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885
Martin v. Löwis11437992002-04-12 09:54:03 +000012886int
12887main ()
12888{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012889
Martin v. Löwis11437992002-04-12 09:54:03 +000012890#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012891 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012893 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895 char const *const *pcpcc;
12896 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 /* NEC SVR4.0.2 mips cc rejects this. */
12898 struct point {int x, y;};
12899 static struct point const zero = {0,0};
12900 /* AIX XL C 1.02.0.0 rejects this.
12901 It does not let you subtract one const X* pointer from another in
12902 an arm of an if-expression whose if-part is not a constant
12903 expression */
12904 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907 ++pcpcc;
12908 ppc = (char**) pcpcc;
12909 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012910 { /* SCO 3.2v4 cc rejects this sort of thing. */
12911 char tx;
12912 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012914
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012917 }
12918 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12919 int x[] = {25, 17};
12920 const int *foo = &x[0];
12921 ++foo;
12922 }
12923 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12924 typedef const int *iptr;
12925 iptr p = 0;
12926 ++p;
12927 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012928 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012930 struct s { int j; const int *ap[3]; } bx;
12931 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012932 }
12933 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12934 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012938#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012939
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 ;
12941 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012942}
Martin v. Löwis11437992002-04-12 09:54:03 +000012943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945 ac_cv_c_const=yes
12946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12952$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956
12957fi
12958
Michael W. Hudson54241132001-12-07 15:38:26 +000012959
Guido van Rossumda88dad1995-01-26 00:46:29 +000012960works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12962$as_echo_n "checking for working volatile... " >&6; }
12963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012964/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012965
Martin v. Löwis11437992002-04-12 09:54:03 +000012966int
12967main ()
12968{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012969volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 ;
12971 return 0;
12972}
12973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012974if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012975 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012976else
Skip Montanaro6dead952003-09-25 14:50:04 +000012977
Matthias Kloseb9621712010-04-24 17:59:49 +000012978$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012979
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012980
Guido van Rossum627b2d71993-12-24 10:39:16 +000012981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12984$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012985
Guido van Rossumda88dad1995-01-26 00:46:29 +000012986works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12988$as_echo_n "checking for working signed char... " >&6; }
12989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012990/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012991
Martin v. Löwis11437992002-04-12 09:54:03 +000012992int
12993main ()
12994{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012995signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 ;
12997 return 0;
12998}
12999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013000if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013001 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013002else
Skip Montanaro6dead952003-09-25 14:50:04 +000013003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013005
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013006
Guido van Rossum7f43da71994-08-01 12:15:30 +000013007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13010$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013011
Guido van Rossumda88dad1995-01-26 00:46:29 +000013012have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13014$as_echo_n "checking for prototypes... " >&6; }
13015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013016/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013017int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013018int
13019main ()
13020{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013021return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 ;
13023 return 0;
13024}
13025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013029
Matthias Kloseb159a552010-04-25 21:00:44 +000013030 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13034$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013035
Guido van Rossumda88dad1995-01-26 00:46:29 +000013036works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13038$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013040/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013041
13042#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013043int foo(int x, ...) {
13044 va_list va;
13045 va_start(va, x);
13046 va_arg(va, int);
13047 va_arg(va, char *);
13048 va_arg(va, double);
13049 return 0;
13050}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013051
Martin v. Löwis11437992002-04-12 09:54:03 +000013052int
13053main ()
13054{
Guido van Rossum90eea071996-08-30 20:58:57 +000013055return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 ;
13057 return 0;
13058}
13059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013060if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013061
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013064
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013065 works=yes
13066
Guido van Rossum627b2d71993-12-24 10:39:16 +000013067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13070$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071
Martin v. Löwisd6320502004-08-12 13:45:08 +000013072# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13074$as_echo_n "checking for socketpair... " >&6; }
13075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013076/* end confdefs.h. */
13077
13078#include <sys/types.h>
13079#include <sys/socket.h>
13080
13081int
13082main ()
13083{
13084void *x=socketpair
13085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013089if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013092
Matthias Kloseb159a552010-04-25 21:00:44 +000013093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013094$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13097$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013098
13099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013101
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013102# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13104$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013106/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013107#include <sys/types.h>
13108#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013109int
13110main ()
13111{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013112struct sockaddr x;
13113x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 ;
13115 return 0;
13116}
13117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013118if ac_fn_c_try_compile "$LINENO"; then :
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13120$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123
13124else
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13126$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013127
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013130
Guido van Rossumda88dad1995-01-26 00:46:29 +000013131va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13133$as_echo_n "checking whether va_list is an array... " >&6; }
13134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013135/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013136
13137#ifdef HAVE_STDARG_PROTOTYPES
13138#include <stdarg.h>
13139#else
13140#include <varargs.h>
13141#endif
13142
Martin v. Löwis11437992002-04-12 09:54:03 +000013143int
13144main ()
13145{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013146va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 ;
13148 return 0;
13149}
13150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013151if ac_fn_c_try_compile "$LINENO"; then :
13152
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013153else
Skip Montanaro6dead952003-09-25 14:50:04 +000013154
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Guido van Rossumda88dad1995-01-26 00:46:29 +000013158 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013159
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13163$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013164
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013165# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013166
13167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013169if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13174$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013175 OLD_CFLAGS=$CFLAGS
13176 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013178/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013179
13180# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013181
Martin v. Löwis11437992002-04-12 09:54:03 +000013182int
13183main ()
13184{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013185
13186 char *name;
13187 struct hostent *he, *res;
13188 char buffer[2048];
13189 int buflen = 2048;
13190 int h_errnop;
13191
13192 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013193
13194 ;
13195 return 0;
13196}
13197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013201
Martin v. Löwis11437992002-04-12 09:54:03 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013204
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13206$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013208else
Skip Montanaro6dead952003-09-25 14:50:04 +000013209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13211$as_echo "no" >&6; }
13212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13213$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013215/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013216
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013217# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013218
Martin v. Löwis11437992002-04-12 09:54:03 +000013219int
13220main ()
13221{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013222
13223 char *name;
13224 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013225 char buffer[2048];
13226 int buflen = 2048;
13227 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013228
Matthias Kloseb159a552010-04-25 21:00:44 +000013229 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
13231 ;
13232 return 0;
13233}
13234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013235if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Matthias Kloseb159a552010-04-25 21:00:44 +000013240$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013241
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13243$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013245else
Skip Montanaro6dead952003-09-25 14:50:04 +000013246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13248$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13250$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252/* end confdefs.h. */
13253
13254# include <netdb.h>
13255
13256int
13257main ()
13258{
13259
13260 char *name;
13261 struct hostent *he;
13262 struct hostent_data data;
13263
13264 (void) gethostbyname_r(name, he, &data);
13265
13266 ;
13267 return 0;
13268}
13269_ACEOF
13270if ac_fn_c_try_compile "$LINENO"; then :
13271
13272 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13273
13274
13275$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13276
13277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13278$as_echo "yes" >&6; }
13279
13280else
13281
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13283$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013293 CFLAGS=$OLD_CFLAGS
13294
13295else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 for ac_func in gethostbyname
13298do :
13299 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013300if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013302#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013303_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013305fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013306done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013307
Michael W. Hudson54241132001-12-07 15:38:26 +000013308
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013309fi
13310
Michael W. Hudson54241132001-12-07 15:38:26 +000013311
13312
13313
13314
13315
13316
Guido van Rossum627b2d71993-12-24 10:39:16 +000013317# checks for system services
13318# (none yet)
13319
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013321ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013322if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013323
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13326$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013327if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329else
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013331LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013335/* Override any GCC internal prototype to avoid an error.
13336 Use char because int might match the return type of a GCC
13337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013338#ifdef __cplusplus
13339extern "C"
13340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013341char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013342int
13343main ()
13344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 ;
13347 return 0;
13348}
13349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013351 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013355rm -f core conftest.err conftest.$ac_objext \
13356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013357LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13360$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013361if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 cat >>confdefs.h <<_ACEOF
13363#define HAVE_LIBIEEE 1
13364_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013366 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013367
Guido van Rossum627b2d71993-12-24 10:39:16 +000013368fi
13369
Michael W. Hudson54241132001-12-07 15:38:26 +000013370
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013371fi
13372
Michael W. Hudson54241132001-12-07 15:38:26 +000013373
Guido van Rossum7f253911997-05-09 02:42:48 +000013374# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13376$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013379if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013381if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013382then
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13387$as_echo "yes" >&6; }
13388else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13389$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013390fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013391else
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13393$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013394fi
13395
Guido van Rossum7f253911997-05-09 02:42:48 +000013396
Guido van Rossum7f43da71994-08-01 12:15:30 +000013397# check for --with-libm=...
13398
Guido van Rossum563e7081996-09-10 18:20:48 +000013399case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013400Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013401*) LIBM=-lm
13402esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13404$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013407if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013409if test "$withval" = no
13410then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13412$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013413elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013414then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13416$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013417else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013418fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013419else
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13421$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422fi
13423
Guido van Rossum7f43da71994-08-01 12:15:30 +000013424
13425# check for --with-libc=...
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13428$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013430# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013431if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013432 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013433if test "$withval" = no
13434then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13436$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013437elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013438then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13440$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013441else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013442fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13445$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446fi
13447
Guido van Rossum7f43da71994-08-01 12:15:30 +000013448
Stefan Krah1919b7e2012-03-21 18:25:23 +010013449# **************************************
13450# * Check for gcc x64 inline assembler *
13451# **************************************
13452
13453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13454$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13456/* end confdefs.h. */
13457
13458int
13459main ()
13460{
13461
13462 __asm__ __volatile__ ("movq %rcx, %rax");
13463
13464 ;
13465 return 0;
13466}
13467_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013468if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013469 have_gcc_asm_for_x64=yes
13470else
13471 have_gcc_asm_for_x64=no
13472fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013473rm -f core conftest.err conftest.$ac_objext \
13474 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13476$as_echo "$have_gcc_asm_for_x64" >&6; }
13477if test "$have_gcc_asm_for_x64" = yes
13478then
13479
13480$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13481
13482fi
13483
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013484# **************************************************
13485# * Check for various properties of floating point *
13486# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13489$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013490if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013492else
13493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013495 ac_cv_little_endian_double=no
13496else
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013498/* end confdefs.h. */
13499
13500#include <string.h>
13501int main() {
13502 double x = 9006104071832581.0;
13503 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13504 return 0;
13505 else
13506 return 1;
13507}
13508
13509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013510if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013511 ac_cv_little_endian_double=yes
13512else
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013517fi
13518
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013519fi
13520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13522$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013523if test "$ac_cv_little_endian_double" = yes
13524then
13525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013527
13528fi
13529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13531$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013532if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013534else
13535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013537 ac_cv_big_endian_double=no
13538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013540/* end confdefs.h. */
13541
13542#include <string.h>
13543int main() {
13544 double x = 9006104071832581.0;
13545 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13546 return 0;
13547 else
13548 return 1;
13549}
13550
13551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013552if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013553 ac_cv_big_endian_double=yes
13554else
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013559fi
13560
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013561fi
13562
Matthias Kloseb9621712010-04-24 17:59:49 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13564$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013565if test "$ac_cv_big_endian_double" = yes
13566then
13567
Matthias Kloseb9621712010-04-24 17:59:49 +000013568$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013569
13570fi
13571
13572# Some ARM platforms use a mixed-endian representation for doubles.
13573# While Python doesn't currently have full support for these platforms
13574# (see e.g., issue 1762561), we can at least make sure that float <-> string
13575# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13577$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013578if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013580else
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013583 ac_cv_mixed_endian_double=no
13584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013586/* end confdefs.h. */
13587
13588#include <string.h>
13589int main() {
13590 double x = 9006104071832581.0;
13591 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13592 return 0;
13593 else
13594 return 1;
13595}
13596
13597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013598if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013599 ac_cv_mixed_endian_double=yes
13600else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13604 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013605fi
13606
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013607fi
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13610$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013611if test "$ac_cv_mixed_endian_double" = yes
13612then
13613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013615
13616fi
13617
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013618# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013619# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013620# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013621# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013622# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013623# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013624
13625# This inline assembler syntax may also work for suncc and icc,
13626# so we try it on all platforms.
13627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13629$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013631/* end confdefs.h. */
13632
13633int
13634main ()
13635{
13636
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013637 unsigned short cw;
13638 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13639 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013640
13641 ;
13642 return 0;
13643}
13644_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013645if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013646 have_gcc_asm_for_x87=yes
13647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013649fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013650rm -f core conftest.err conftest.$ac_objext \
13651 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13653$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013654if test "$have_gcc_asm_for_x87" = yes
13655then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013658
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013660
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13662$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13664/* end confdefs.h. */
13665
13666int
13667main ()
13668{
13669
13670 unsigned int fpcr;
13671 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13672 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13673
13674 ;
13675 return 0;
13676}
13677_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013678if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013679 have_gcc_asm_for_mc68881=yes
13680else
13681 have_gcc_asm_for_mc68881=no
13682fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013683rm -f core conftest.err conftest.$ac_objext \
13684 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13686$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13687if test "$have_gcc_asm_for_mc68881" = yes
13688then
13689
13690$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13691
13692fi
13693
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013694# Detect whether system arithmetic is subject to x87-style double
13695# rounding issues. The result of this test has little meaning on non
13696# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13697# mode is round-to-nearest and double rounding issues are present, and
13698# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13700$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013701# $BASECFLAGS may affect the result
13702ac_save_cc="$CC"
13703CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013705 ac_cv_x87_double_rounding=no
13706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013708/* end confdefs.h. */
13709
13710#include <stdlib.h>
13711#include <math.h>
13712int main() {
13713 volatile double x, y, z;
13714 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13715 x = 0.99999999999999989; /* 1-2**-53 */
13716 y = 1./x;
13717 if (y != 1.)
13718 exit(0);
13719 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13720 x = 1e16;
13721 y = 2.99999;
13722 z = x + y;
13723 if (z != 1e16+4.)
13724 exit(0);
13725 /* both tests show evidence of double rounding */
13726 exit(1);
13727}
13728
13729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013730if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013731 ac_cv_x87_double_rounding=no
13732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013737fi
13738
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013739CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13741$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013742if test "$ac_cv_x87_double_rounding" = yes
13743then
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013746
13747fi
13748
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013749# ************************************
13750# * Check for mathematical functions *
13751# ************************************
13752
13753LIBS_SAVE=$LIBS
13754LIBS="$LIBS $LIBM"
13755
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013756for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13757do :
13758 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13759ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013760if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013761 cat >>confdefs.h <<_ACEOF
13762#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13763_ACEOF
13764
13765fi
13766done
13767
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013768for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013769do :
13770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13771ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013772if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013773 cat >>confdefs.h <<_ACEOF
13774#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13775_ACEOF
13776
13777fi
13778done
13779
13780ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13781"
Victor Stinnere0be4232011-10-25 13:06:09 +020013782if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013783 ac_have_decl=1
13784else
13785 ac_have_decl=0
13786fi
13787
13788cat >>confdefs.h <<_ACEOF
13789#define HAVE_DECL_ISINF $ac_have_decl
13790_ACEOF
13791ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13792"
Victor Stinnere0be4232011-10-25 13:06:09 +020013793if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013794 ac_have_decl=1
13795else
13796 ac_have_decl=0
13797fi
13798
13799cat >>confdefs.h <<_ACEOF
13800#define HAVE_DECL_ISNAN $ac_have_decl
13801_ACEOF
13802ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13803"
Victor Stinnere0be4232011-10-25 13:06:09 +020013804if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013805 ac_have_decl=1
13806else
13807 ac_have_decl=0
13808fi
13809
13810cat >>confdefs.h <<_ACEOF
13811#define HAVE_DECL_ISFINITE $ac_have_decl
13812_ACEOF
13813
13814
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013815# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13816# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13818$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013819if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013821else
13822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013824 ac_cv_tanh_preserves_zero_sign=no
13825else
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013827/* end confdefs.h. */
13828
13829#include <math.h>
13830#include <stdlib.h>
13831int main() {
13832 /* return 0 if either negative zeros don't exist
13833 on this platform or if negative zeros exist
13834 and tanh(-0.) == -0. */
13835 if (atan2(0., -1.) == atan2(-0., -1.) ||
13836 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13837 else exit(1);
13838}
13839
13840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013841if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013842 ac_cv_tanh_preserves_zero_sign=yes
13843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013848fi
13849
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013850fi
13851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13853$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013854if test "$ac_cv_tanh_preserves_zero_sign" = yes
13855then
13856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013858
13859fi
13860
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013861if test "$ac_cv_func_log1p" = yes
13862then
13863 # On some versions of AIX, log1p(-0.) returns 0. instead of
13864 # -0. See issue #9920.
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13866$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013867 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013868 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013869else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013870
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013871 if test "$cross_compiling" = yes; then :
13872 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013873else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013876
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013877 #include <math.h>
13878 #include <stdlib.h>
13879 int main() {
13880 /* Fail if the signs of log1p(-0.) and -0. can be
13881 distinguished. */
13882 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13883 return 0;
13884 else
13885 return 1;
13886 }
13887
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013888_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013889if ac_fn_c_try_run "$LINENO"; then :
13890 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013891else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013892 ac_cv_log1p_drops_zero_sign=yes
13893fi
13894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013896fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013897
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013898fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013899
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13901$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13902fi
13903if test "$ac_cv_log1p_drops_zero_sign" = yes
13904then
13905
13906$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13907
13908fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013909
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013910LIBS=$LIBS_SAVE
13911
Mark Dickinsona614f042009-11-28 12:48:43 +000013912# For multiprocessing module, check that sem_open
13913# actually works. For FreeBSD versions <= 7.2,
13914# the kernel module that provides POSIX semaphores
13915# isn't loaded by default, so an attempt to call
13916# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13918$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013919if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013921else
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013923 ac_cv_posix_semaphores_enabled=yes
13924else
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013926/* end confdefs.h. */
13927
13928#include <unistd.h>
13929#include <fcntl.h>
13930#include <stdio.h>
13931#include <semaphore.h>
13932#include <sys/stat.h>
13933
13934int main(void) {
13935 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13936 if (a == SEM_FAILED) {
13937 perror("sem_open");
13938 return 1;
13939 }
13940 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013941 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013942 return 0;
13943}
13944
13945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013946if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013947 ac_cv_posix_semaphores_enabled=yes
13948else
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013953fi
13954
13955
Mark Dickinsona614f042009-11-28 12:48:43 +000013956fi
13957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13959$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013960if test $ac_cv_posix_semaphores_enabled = no
13961then
13962
Matthias Kloseb9621712010-04-24 17:59:49 +000013963$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013964
13965fi
13966
Mark Dickinson10683072009-04-18 21:18:19 +000013967# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13969$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013970if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013972else
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013974 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013975else
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013977/* end confdefs.h. */
13978
13979#include <unistd.h>
13980#include <fcntl.h>
13981#include <stdio.h>
13982#include <semaphore.h>
13983#include <sys/stat.h>
13984
13985int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013986 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013987 int count;
13988 int res;
13989 if(a==SEM_FAILED){
13990 perror("sem_open");
13991 return 1;
13992
13993 }
13994 res = sem_getvalue(a, &count);
13995 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013996 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013997 return res==-1 ? 1 : 0;
13998}
13999
Mark Dickinson10683072009-04-18 21:18:19 +000014000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014001if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014002 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014003else
Matthias Kloseb9621712010-04-24 17:59:49 +000014004 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14007 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014008fi
14009
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014011fi
14012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14014$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014015if test $ac_cv_broken_sem_getvalue = yes
14016then
14017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014019
14020fi
14021
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014022ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14023"
14024if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14025 ac_have_decl=1
14026else
14027 ac_have_decl=0
14028fi
14029
14030cat >>confdefs.h <<_ACEOF
14031#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14032_ACEOF
14033ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14034"
14035if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14036 ac_have_decl=1
14037else
14038 ac_have_decl=0
14039fi
14040
14041cat >>confdefs.h <<_ACEOF
14042#define HAVE_DECL_RTLD_NOW $ac_have_decl
14043_ACEOF
14044ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14045"
14046if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14047 ac_have_decl=1
14048else
14049 ac_have_decl=0
14050fi
14051
14052cat >>confdefs.h <<_ACEOF
14053#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14054_ACEOF
14055ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14056"
14057if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14058 ac_have_decl=1
14059else
14060 ac_have_decl=0
14061fi
14062
14063cat >>confdefs.h <<_ACEOF
14064#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14065_ACEOF
14066ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14067"
14068if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14069 ac_have_decl=1
14070else
14071 ac_have_decl=0
14072fi
14073
14074cat >>confdefs.h <<_ACEOF
14075#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14076_ACEOF
14077ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14078"
14079if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14080 ac_have_decl=1
14081else
14082 ac_have_decl=0
14083fi
14084
14085cat >>confdefs.h <<_ACEOF
14086#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14087_ACEOF
14088ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14089"
14090if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14091 ac_have_decl=1
14092else
14093 ac_have_decl=0
14094fi
14095
14096cat >>confdefs.h <<_ACEOF
14097#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14098_ACEOF
14099
14100
Mark Dickinsonbd792642009-03-18 20:06:12 +000014101# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14103$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014104# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014105if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014106 enableval=$enable_big_digits; case $enable_big_digits in
14107yes)
14108 enable_big_digits=30 ;;
14109no)
14110 enable_big_digits=15 ;;
1411115|30)
14112 ;;
14113*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014114 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 +000014115esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14117$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014118
14119cat >>confdefs.h <<_ACEOF
14120#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14121_ACEOF
14122
14123
14124else
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14126$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014127fi
14128
14129
Guido van Rossumef2255b2000-03-10 22:30:29 +000014130# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014131ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014132if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
14134
Matthias Kloseb9621712010-04-24 17:59:49 +000014135$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014136
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014137 wchar_h="yes"
14138
Guido van Rossumef2255b2000-03-10 22:30:29 +000014139else
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014141
14142fi
14143
Michael W. Hudson54241132001-12-07 15:38:26 +000014144
Martin v. Löwis11437992002-04-12 09:54:03 +000014145
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014146# determine wchar_t size
14147if test "$wchar_h" = yes
14148then
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14151# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14152# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14154$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014155if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014157else
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14159"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161else
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 if test "$ac_cv_type_wchar_t" = yes; then
14163 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014165as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014166See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167 else
14168 ac_cv_sizeof_wchar_t=0
14169 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014171
Martin v. Löwis11437992002-04-12 09:54:03 +000014172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14174$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175
14176
14177
Martin v. Löwis11437992002-04-12 09:54:03 +000014178cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014179#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014180_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014181
Michael W. Hudson54241132001-12-07 15:38:26 +000014182
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014183fi
14184
Matthias Kloseb9621712010-04-24 17:59:49 +000014185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14186$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014187have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014189/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014190
14191#include <tcl.h>
14192#if TCL_UTF_MAX != 6
14193# error "NOT UCS4_TCL"
14194#endif
14195int
14196main ()
14197{
14198
14199 ;
14200 return 0;
14201}
14202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014204
14205
Matthias Kloseb9621712010-04-24 17:59:49 +000014206$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014207
14208 have_ucs4_tcl=yes
14209
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14213$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014214
Skip Montanaro6dead952003-09-25 14:50:04 +000014215# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014216if test "$wchar_h" = yes
14217then
14218 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14220$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014221 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014223else
14224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014226 ac_cv_wchar_t_signed=yes
14227else
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014229/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014230
14231 #include <wchar.h>
14232 int main()
14233 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014234 /* Success: exit code 0 */
14235 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014236 }
14237
14238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014239if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014240 ac_cv_wchar_t_signed=yes
14241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14245 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014246fi
14247
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014248fi
14249
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14251$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252fi
14253
Georg Brandl52d168a2008-01-07 18:10:24 +000014254# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014255if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014256 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014257then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014258 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014259
Matthias Kloseb9621712010-04-24 17:59:49 +000014260$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014261
Georg Brandl52d168a2008-01-07 18:10:24 +000014262else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014263 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014264fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14266$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014267
14268# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14270$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014271if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014273else
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 ac_cv_c_bigendian=unknown
14275 # See if we're dealing with a universal compiler.
14276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14277/* end confdefs.h. */
14278#ifndef __APPLE_CC__
14279 not a universal capable compiler
14280 #endif
14281 typedef int dummy;
14282
Skip Montanaro6dead952003-09-25 14:50:04 +000014283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if ac_fn_c_try_compile "$LINENO"; then :
14285
14286 # Check for potential -arch flags. It is not universal unless
14287 # there are at least two -arch flags with different values.
14288 ac_arch=
14289 ac_prev=
14290 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14291 if test -n "$ac_prev"; then
14292 case $ac_word in
14293 i?86 | x86_64 | ppc | ppc64)
14294 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14295 ac_arch=$ac_word
14296 else
14297 ac_cv_c_bigendian=universal
14298 break
14299 fi
14300 ;;
14301 esac
14302 ac_prev=
14303 elif test "x$ac_word" = "x-arch"; then
14304 ac_prev=arch
14305 fi
14306 done
14307fi
14308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14309 if test $ac_cv_c_bigendian = unknown; then
14310 # See if sys/param.h defines the BYTE_ORDER macro.
14311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014312/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014313#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014315
Martin v. Löwis11437992002-04-12 09:54:03 +000014316int
14317main ()
14318{
Matthias Kloseb9621712010-04-24 17:59:49 +000014319#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14320 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14321 && LITTLE_ENDIAN)
14322 bogus endian macros
14323 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014324
14325 ;
14326 return 0;
14327}
14328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014329if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014330 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014332/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014333#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014335
Martin v. Löwis11437992002-04-12 09:54:03 +000014336int
14337main ()
14338{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014339#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 not big endian
14341 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
14343 ;
14344 return 0;
14345}
14346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014347if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014348 ac_cv_c_bigendian=yes
14349else
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014353fi
14354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14355 fi
14356 if test $ac_cv_c_bigendian = unknown; then
14357 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014359/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014360#include <limits.h>
14361
Martin v. Löwis11437992002-04-12 09:54:03 +000014362int
14363main ()
14364{
Matthias Kloseb9621712010-04-24 17:59:49 +000014365#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14366 bogus endian macros
14367 #endif
14368
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 ;
14370 return 0;
14371}
14372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014373if ac_fn_c_try_compile "$LINENO"; then :
14374 # It does; now see whether it defined to _BIG_ENDIAN or not.
14375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14376/* end confdefs.h. */
14377#include <limits.h>
14378
14379int
14380main ()
14381{
14382#ifndef _BIG_ENDIAN
14383 not big endian
14384 #endif
14385
14386 ;
14387 return 0;
14388}
14389_ACEOF
14390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014392else
Matthias Kloseb9621712010-04-24 17:59:49 +000014393 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14396fi
14397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14398 fi
14399 if test $ac_cv_c_bigendian = unknown; then
14400 # Compile a test program.
14401 if test "$cross_compiling" = yes; then :
14402 # Try to guess by grepping values from an object file.
14403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14404/* end confdefs.h. */
14405short int ascii_mm[] =
14406 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14407 short int ascii_ii[] =
14408 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14409 int use_ascii (int i) {
14410 return ascii_mm[i] + ascii_ii[i];
14411 }
14412 short int ebcdic_ii[] =
14413 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14414 short int ebcdic_mm[] =
14415 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14416 int use_ebcdic (int i) {
14417 return ebcdic_mm[i] + ebcdic_ii[i];
14418 }
14419 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421int
14422main ()
14423{
14424return use_ascii (foo) == use_ebcdic (foo);
14425 ;
14426 return 0;
14427}
14428_ACEOF
14429if ac_fn_c_try_compile "$LINENO"; then :
14430 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14431 ac_cv_c_bigendian=yes
14432 fi
14433 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14434 if test "$ac_cv_c_bigendian" = unknown; then
14435 ac_cv_c_bigendian=no
14436 else
14437 # finding both strings is unlikely to happen, but who knows?
14438 ac_cv_c_bigendian=unknown
14439 fi
14440 fi
14441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014443else
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014445/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014447int
14448main ()
14449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 /* Are we little or big endian? From Harbison&Steele. */
14452 union
14453 {
14454 long int l;
14455 char c[sizeof (long int)];
14456 } u;
14457 u.l = 1;
14458 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459
14460 ;
14461 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014462}
Martin v. Löwis11437992002-04-12 09:54:03 +000014463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014464if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014465 ac_cv_c_bigendian=no
14466else
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14470 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14476$as_echo "$ac_cv_c_bigendian" >&6; }
14477 case $ac_cv_c_bigendian in #(
14478 yes)
14479 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14480;; #(
14481 no)
14482 ;; #(
14483 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014484
Matthias Kloseb9621712010-04-24 17:59:49 +000014485$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 ;; #(
14488 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014489 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014490 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014492
Michael W. Hudson54241132001-12-07 15:38:26 +000014493
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014494# ABI version string for Python extension modules. This appears between the
14495# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14496# from the following attributes which affect the ABI of this Python build (in
14497# this order):
14498#
14499# * The Python implementation (always 'cpython-' for us)
14500# * The major and minor version numbers
14501# * --with-pydebug (adds a 'd')
14502# * --with-pymalloc (adds a 'm')
14503# * --with-wide-unicode (adds a 'u')
14504#
14505# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014506# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14507# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014508
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14510$as_echo_n "checking ABIFLAGS... " >&6; }
14511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14512$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14514$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014515SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14517$as_echo "$SOABI" >&6; }
14518
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014519
14520case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014521 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014522 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14523 *)
14524 EXT_SUFFIX=${SHLIB_SUFFIX};;
14525esac
14526
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14528$as_echo_n "checking LDVERSION... " >&6; }
14529LDVERSION='$(VERSION)$(ABIFLAGS)'
14530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14531$as_echo "$LDVERSION" >&6; }
14532
doko@python.org87421192013-01-26 11:39:31 +010014533
doko@ubuntu.com55532312016-06-14 08:55:19 +020014534if test x$PLATFORM_TRIPLET = x; then
14535 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14536else
14537 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14538fi
doko@python.org87421192013-01-26 11:39:31 +010014539
14540
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014541# Check whether right shifting a negative integer extends the sign bit
14542# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14544$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014545if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014547else
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014550 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014551else
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014553/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014554
14555int main()
14556{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014557 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014558}
14559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014561if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014562 ac_cv_rshift_extends_sign=yes
14563else
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14567 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014568fi
14569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570fi
14571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14573$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014574if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014575then
Martin v. Löwis11437992002-04-12 09:54:03 +000014576
Matthias Kloseb9621712010-04-24 17:59:49 +000014577$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014578
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014579fi
14580
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014581# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14583$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014584if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014586else
Martin v. Löwis11437992002-04-12 09:54:03 +000014587
Matthias Kloseb9621712010-04-24 17:59:49 +000014588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014589/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014590#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014591int
14592main ()
14593{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014594
14595 FILE *f = fopen("/dev/null", "r");
14596 flockfile(f);
14597 getc_unlocked(f);
14598 funlockfile(f);
14599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600 ;
14601 return 0;
14602}
14603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014604if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014605 ac_cv_have_getc_unlocked=yes
14606else
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 ac_cv_have_getc_unlocked=no
14608fi
14609rm -f core conftest.err conftest.$ac_objext \
14610 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14614$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014615if test "$ac_cv_have_getc_unlocked" = yes
14616then
Martin v. Löwis11437992002-04-12 09:54:03 +000014617
Matthias Kloseb9621712010-04-24 17:59:49 +000014618$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014619
14620fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014621
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014622# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014623# save the value of LIBS so we don't actually link Python with readline
14624LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014625
Gregory P. Smith18820942008-09-07 06:24:49 +000014626# On some systems we need to link readline to a termcap compatible
14627# library. NOTE: Keep the precedence of listed libraries synchronised
14628# with setup.py.
14629py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14631$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014632for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014633 if test -z "$py_libtermcap"; then
14634 READLINE_LIBS="-lreadline"
14635 else
14636 READLINE_LIBS="-lreadline -l$py_libtermcap"
14637 fi
14638 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014640/* end confdefs.h. */
14641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642/* Override any GCC internal prototype to avoid an error.
14643 Use char because int might match the return type of a GCC
14644 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014645#ifdef __cplusplus
14646extern "C"
14647#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014648char readline ();
14649int
14650main ()
14651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014652return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014653 ;
14654 return 0;
14655}
14656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014657if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014658 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014660rm -f core conftest.err conftest.$ac_objext \
14661 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014662 if test $py_cv_lib_readline = yes; then
14663 break
14664 fi
14665done
14666# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14667#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014668if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14670$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014671else
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14673$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014676
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014677fi
14678
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014679# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14681$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014682if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014684else
14685 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014686LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014688/* end confdefs.h. */
14689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690/* Override any GCC internal prototype to avoid an error.
14691 Use char because int might match the return type of a GCC
14692 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014693#ifdef __cplusplus
14694extern "C"
14695#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014696char rl_callback_handler_install ();
14697int
14698main ()
14699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014701 ;
14702 return 0;
14703}
14704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014705if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014706 ac_cv_lib_readline_rl_callback_handler_install=yes
14707else
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014710rm -f core conftest.err conftest.$ac_objext \
14711 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014712LIBS=$ac_check_lib_save_LIBS
14713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14715$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014716if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014717
Matthias Kloseb9621712010-04-24 17:59:49 +000014718$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014719
14720fi
14721
14722
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014723# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014725/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014726#include <readline/readline.h>
14727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014728if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014729 have_readline=yes
14730else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014731 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014732
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014733fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014734rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014735if test $have_readline = yes
14736then
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014738/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014739#include <readline/readline.h>
14740
14741_ACEOF
14742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014746
14747fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014748rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014751/* end confdefs.h. */
14752#include <readline/readline.h>
14753
14754_ACEOF
14755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014756 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014759
14760fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014761rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014762
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014763fi
14764
Martin v. Löwis0daad592001-09-30 21:09:59 +000014765# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14767$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014768if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014770else
Martin v. Löwis11437992002-04-12 09:54:03 +000014771 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014772LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776/* Override any GCC internal prototype to avoid an error.
14777 Use char because int might match the return type of a GCC
14778 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014779#ifdef __cplusplus
14780extern "C"
14781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014782char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014783int
14784main ()
14785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014787 ;
14788 return 0;
14789}
14790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014791if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014793else
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014796rm -f core conftest.err conftest.$ac_objext \
14797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014798LIBS=$ac_check_lib_save_LIBS
14799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14801$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014802if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014803
Matthias Kloseb9621712010-04-24 17:59:49 +000014804$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014805
Martin v. Löwis0daad592001-09-30 21:09:59 +000014806fi
14807
Michael W. Hudson54241132001-12-07 15:38:26 +000014808
Thomas Wouters89d996e2007-09-08 17:39:28 +000014809# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14811$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014812if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014814else
14815 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014816LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014818/* end confdefs.h. */
14819
14820/* Override any GCC internal prototype to avoid an error.
14821 Use char because int might match the return type of a GCC
14822 builtin and then its argument prototype would still apply. */
14823#ifdef __cplusplus
14824extern "C"
14825#endif
14826char rl_completion_display_matches_hook ();
14827int
14828main ()
14829{
14830return rl_completion_display_matches_hook ();
14831 ;
14832 return 0;
14833}
14834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014836 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840rm -f core conftest.err conftest.$ac_objext \
14841 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014842LIBS=$ac_check_lib_save_LIBS
14843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14845$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014846if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014849
14850fi
14851
14852
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014853# also in 4.0, but not in editline
14854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14855$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14856if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14857 $as_echo_n "(cached) " >&6
14858else
14859 ac_check_lib_save_LIBS=$LIBS
14860LIBS="-lreadline $READLINE_LIBS $LIBS"
14861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14862/* end confdefs.h. */
14863
14864/* Override any GCC internal prototype to avoid an error.
14865 Use char because int might match the return type of a GCC
14866 builtin and then its argument prototype would still apply. */
14867#ifdef __cplusplus
14868extern "C"
14869#endif
14870char rl_resize_terminal ();
14871int
14872main ()
14873{
14874return rl_resize_terminal ();
14875 ;
14876 return 0;
14877}
14878_ACEOF
14879if ac_fn_c_try_link "$LINENO"; then :
14880 ac_cv_lib_readline_rl_resize_terminal=yes
14881else
14882 ac_cv_lib_readline_rl_resize_terminal=no
14883fi
14884rm -f core conftest.err conftest.$ac_objext \
14885 conftest$ac_exeext conftest.$ac_ext
14886LIBS=$ac_check_lib_save_LIBS
14887fi
14888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14889$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14890if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14891
14892$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14893
14894fi
14895
14896
Martin v. Löwis0daad592001-09-30 21:09:59 +000014897# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14899$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014900if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014901 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014902else
Martin v. Löwis11437992002-04-12 09:54:03 +000014903 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014904LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908/* Override any GCC internal prototype to avoid an error.
14909 Use char because int might match the return type of a GCC
14910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014911#ifdef __cplusplus
14912extern "C"
14913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014914char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014915int
14916main ()
14917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 ;
14920 return 0;
14921}
14922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014924 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014925else
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014928rm -f core conftest.err conftest.$ac_objext \
14929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014930LIBS=$ac_check_lib_save_LIBS
14931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14933$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014934if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014935
Matthias Kloseb9621712010-04-24 17:59:49 +000014936$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014937
Guido van Rossum353ae582001-07-10 16:45:32 +000014938fi
14939
Jack Jansendd19cf82001-12-06 22:36:17 +000014940
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014943/* end confdefs.h. */
14944#include <readline/readline.h>
14945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014946if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014947 have_readline=yes
14948else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014949 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014950
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014951fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014952rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014953if test $have_readline = yes
14954then
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014956/* end confdefs.h. */
14957#include <readline/readline.h>
14958
14959_ACEOF
14960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014962
Matthias Kloseb9621712010-04-24 17:59:49 +000014963$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014964
14965fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014966rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014967
14968fi
14969
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14971$as_echo_n "checking for append_history in -lreadline... " >&6; }
14972if ${ac_cv_lib_readline_append_history+:} false; then :
14973 $as_echo_n "(cached) " >&6
14974else
14975 ac_check_lib_save_LIBS=$LIBS
14976LIBS="-lreadline $READLINE_LIBS $LIBS"
14977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14978/* end confdefs.h. */
14979
14980/* Override any GCC internal prototype to avoid an error.
14981 Use char because int might match the return type of a GCC
14982 builtin and then its argument prototype would still apply. */
14983#ifdef __cplusplus
14984extern "C"
14985#endif
14986char append_history ();
14987int
14988main ()
14989{
14990return append_history ();
14991 ;
14992 return 0;
14993}
14994_ACEOF
14995if ac_fn_c_try_link "$LINENO"; then :
14996 ac_cv_lib_readline_append_history=yes
14997else
14998 ac_cv_lib_readline_append_history=no
14999fi
15000rm -f core conftest.err conftest.$ac_objext \
15001 conftest$ac_exeext conftest.$ac_ext
15002LIBS=$ac_check_lib_save_LIBS
15003fi
15004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15005$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15006if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15007
15008$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15009
15010fi
15011
15012
Martin v. Löwis82bca632006-02-10 20:49:30 +000015013# End of readline checks: restore LIBS
15014LIBS=$LIBS_no_readline
15015
Matthias Kloseb9621712010-04-24 17:59:49 +000015016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15017$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015018if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015020else
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
Matthias Kloseb9621712010-04-24 17:59:49 +000015022if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015023 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015024else
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015026/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015027
15028int main()
15029{
15030 int val1 = nice(1);
15031 if (val1 != -1 && val1 == nice(2))
15032 exit(0);
15033 exit(1);
15034}
15035
Martin v. Löwis11437992002-04-12 09:54:03 +000015036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015037if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015038 ac_cv_broken_nice=yes
15039else
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015044fi
15045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046fi
15047
Matthias Kloseb9621712010-04-24 17:59:49 +000015048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15049$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015050if test "$ac_cv_broken_nice" = yes
15051then
Martin v. Löwis11437992002-04-12 09:54:03 +000015052
Matthias Kloseb9621712010-04-24 17:59:49 +000015053$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015054
15055fi
15056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15058$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015059if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015061else
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015063 ac_cv_broken_poll=no
15064else
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015066/* end confdefs.h. */
15067
15068#include <poll.h>
15069
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015070int main()
15071{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015072 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015073 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015074
15075 close (42);
15076
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015077 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015078 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015079 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015080 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015081 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015082 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015083 return 1;
15084}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015085
15086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015087if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015088 ac_cv_broken_poll=yes
15089else
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015096fi
15097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15099$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015100if test "$ac_cv_broken_poll" = yes
15101then
15102
Matthias Kloseb9621712010-04-24 17:59:49 +000015103$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015104
15105fi
15106
Brett Cannon43802422005-02-10 20:48:03 +000015107# 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 +000015108# (which is not required by ISO C or UNIX spec) and/or if we support
15109# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015110ac_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 +000015111#include <$ac_cv_struct_tm>
15112
Matthias Kloseb9621712010-04-24 17:59:49 +000015113"
Victor Stinnere0be4232011-10-25 13:06:09 +020015114if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015115
15116cat >>confdefs.h <<_ACEOF
15117#define HAVE_STRUCT_TM_TM_ZONE 1
15118_ACEOF
15119
15120
15121fi
15122
15123if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15124
Matthias Kloseb9621712010-04-24 17:59:49 +000015125$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015126
15127else
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15129"
Victor Stinnere0be4232011-10-25 13:06:09 +020015130if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132else
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134fi
15135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015137#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138_ACEOF
15139
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15141$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015142if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144else
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015146/* end confdefs.h. */
15147#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148#if !HAVE_DECL_TZNAME
15149extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015150#endif
15151
15152int
15153main ()
15154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015156 ;
15157 return 0;
15158}
15159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015160if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015161 ac_cv_var_tzname=yes
15162else
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015165rm -f core conftest.err conftest.$ac_objext \
15166 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15169$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015170 if test $ac_cv_var_tzname = yes; then
15171
Matthias Kloseb9621712010-04-24 17:59:49 +000015172$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015173
15174 fi
15175fi
15176
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015177
Martin v. Löwis1d459062005-03-14 21:23:33 +000015178# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15180$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015181if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015182 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015183else
15184
Matthias Kloseb9621712010-04-24 17:59:49 +000015185if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015186 ac_cv_working_tzset=no
15187else
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015189/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015190
15191#include <stdlib.h>
15192#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015193#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015194
15195#if HAVE_TZNAME
15196extern char *tzname[];
15197#endif
15198
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015199int main()
15200{
Brett Cannon18367812003-09-19 00:59:16 +000015201 /* Note that we need to ensure that not only does tzset(3)
15202 do 'something' with localtime, but it works as documented
15203 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015204 This includes making sure that tzname is set properly if
15205 tm->tm_zone does not exist since it is the alternative way
15206 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015207
15208 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015209 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015210 */
15211
Martin v. Löwis1d459062005-03-14 21:23:33 +000015212 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015213 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15214
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015215 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015216 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015217 if (localtime(&groundhogday)->tm_hour != 0)
15218 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015219#if HAVE_TZNAME
15220 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15221 if (strcmp(tzname[0], "UTC") ||
15222 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15223 exit(1);
15224#endif
Brett Cannon18367812003-09-19 00:59:16 +000015225
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015226 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015227 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015228 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015229 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015230#if HAVE_TZNAME
15231 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15232 exit(1);
15233#endif
Brett Cannon18367812003-09-19 00:59:16 +000015234
15235 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15236 tzset();
15237 if (localtime(&groundhogday)->tm_hour != 11)
15238 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015239#if HAVE_TZNAME
15240 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15241 exit(1);
15242#endif
15243
15244#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015245 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15246 exit(1);
15247 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15248 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015249#endif
Brett Cannon18367812003-09-19 00:59:16 +000015250
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015251 exit(0);
15252}
15253
15254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015255if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015256 ac_cv_working_tzset=yes
15257else
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15261 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015262fi
15263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264fi
15265
Matthias Kloseb9621712010-04-24 17:59:49 +000015266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15267$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015268if test "$ac_cv_working_tzset" = yes
15269then
15270
Matthias Kloseb9621712010-04-24 17:59:49 +000015271$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015272
15273fi
15274
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015275# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15277$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015278if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015280else
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015282/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015283#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015284int
15285main ()
15286{
15287
15288struct stat st;
15289st.st_mtim.tv_nsec = 1;
15290
15291 ;
15292 return 0;
15293}
15294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015296 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015297else
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15301fi
15302
Matthias Kloseb9621712010-04-24 17:59:49 +000015303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15304$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015305if test "$ac_cv_stat_tv_nsec" = yes
15306then
15307
Matthias Kloseb9621712010-04-24 17:59:49 +000015308$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015309
15310fi
15311
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015312# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15314$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015315if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015317else
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015319/* end confdefs.h. */
15320#include <sys/stat.h>
15321int
15322main ()
15323{
15324
15325struct stat st;
15326st.st_mtimespec.tv_nsec = 1;
15327
15328 ;
15329 return 0;
15330}
15331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015333 ac_cv_stat_tv_nsec2=yes
15334else
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15338fi
15339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15341$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015342if test "$ac_cv_stat_tv_nsec2" = yes
15343then
15344
Matthias Kloseb9621712010-04-24 17:59:49 +000015345$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015346
15347fi
15348
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015349# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015350ac_save_cppflags="$CPPFLAGS"
15351CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015352
15353for ac_header in curses.h ncurses.h
15354do :
15355 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15356ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15357if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15358 cat >>confdefs.h <<_ACEOF
15359#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15360_ACEOF
15361
15362fi
15363
15364done
15365
15366
15367# On Solaris, term.h requires curses.h
15368for ac_header in term.h
15369do :
15370 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15371#ifdef HAVE_CURSES_H
15372#include <curses.h>
15373#endif
15374
15375"
15376if test "x$ac_cv_header_term_h" = xyes; then :
15377 cat >>confdefs.h <<_ACEOF
15378#define HAVE_TERM_H 1
15379_ACEOF
15380
15381fi
15382
15383done
15384
15385
Jack Jansen666b1e72001-10-31 12:11:48 +000015386# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15388$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015389if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015391else
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015393/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015394#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015395int
15396main ()
15397{
Jack Jansen666b1e72001-10-31 12:11:48 +000015398
15399 int rtn;
15400 rtn = mvwdelch(0,0,0);
15401
Martin v. Löwis11437992002-04-12 09:54:03 +000015402 ;
15403 return 0;
15404}
15405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015406if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015407 ac_cv_mvwdelch_is_expression=yes
15408else
Matthias Kloseb9621712010-04-24 17:59:49 +000015409 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15412fi
15413
Matthias Kloseb9621712010-04-24 17:59:49 +000015414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15415$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015416
15417if test "$ac_cv_mvwdelch_is_expression" = yes
15418then
Martin v. Löwis11437992002-04-12 09:54:03 +000015419
Matthias Kloseb9621712010-04-24 17:59:49 +000015420$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015421
15422fi
15423
Matthias Kloseb9621712010-04-24 17:59:49 +000015424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15425$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015426if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015428else
Matthias Kloseb9621712010-04-24 17:59:49 +000015429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015430/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015431#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015432int
15433main ()
15434{
Jack Jansen666b1e72001-10-31 12:11:48 +000015435
15436 WINDOW *w;
15437 w->_flags = 0;
15438
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 ;
15440 return 0;
15441}
15442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015443if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015444 ac_cv_window_has_flags=yes
15445else
Matthias Kloseb9621712010-04-24 17:59:49 +000015446 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15449fi
15450
Matthias Kloseb9621712010-04-24 17:59:49 +000015451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15452$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015453
Jack Jansen666b1e72001-10-31 12:11:48 +000015454
15455if test "$ac_cv_window_has_flags" = yes
15456then
Martin v. Löwis11437992002-04-12 09:54:03 +000015457
Matthias Kloseb9621712010-04-24 17:59:49 +000015458$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015459
15460fi
15461
Matthias Kloseb9621712010-04-24 17:59:49 +000015462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15463$as_echo_n "checking for is_term_resized... " >&6; }
15464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015465/* end confdefs.h. */
15466#include <curses.h>
15467int
15468main ()
15469{
15470void *x=is_term_resized
15471 ;
15472 return 0;
15473}
15474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015476
Matthias Kloseb9621712010-04-24 17:59:49 +000015477$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015478
Matthias Kloseb159a552010-04-25 21:00:44 +000015479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015480$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015481else
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15483$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015484
15485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15489$as_echo_n "checking for resize_term... " >&6; }
15490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015491/* end confdefs.h. */
15492#include <curses.h>
15493int
15494main ()
15495{
15496void *x=resize_term
15497 ;
15498 return 0;
15499}
15500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015501if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015504
Matthias Kloseb159a552010-04-25 21:00:44 +000015505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015506$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015507else
Matthias Kloseb9621712010-04-24 17:59:49 +000015508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15509$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015510
15511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15513
Matthias Kloseb9621712010-04-24 17:59:49 +000015514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15515$as_echo_n "checking for resizeterm... " >&6; }
15516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015517/* end confdefs.h. */
15518#include <curses.h>
15519int
15520main ()
15521{
15522void *x=resizeterm
15523 ;
15524 return 0;
15525}
15526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015527if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015528
Matthias Kloseb9621712010-04-24 17:59:49 +000015529$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015530
Matthias Kloseb159a552010-04-25 21:00:44 +000015531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015532$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015533else
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15535$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015536
15537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015539# last curses configure check
15540CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15543$as_echo "$as_me: checking for device files" >&6;}
15544
15545if test "x$cross_compiling" = xyes; then
15546 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15548$as_echo_n "checking for /dev/ptmx... " >&6; }
15549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15550$as_echo "not set" >&6; }
15551 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15552 fi
15553 if test "${ac_cv_file__dev_ptc+set}" != set; then
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15555$as_echo_n "checking for /dev/ptc... " >&6; }
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15557$as_echo "not set" >&6; }
15558 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15559 fi
15560fi
15561
Matthias Kloseb9621712010-04-24 17:59:49 +000015562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15563$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015564if ${ac_cv_file__dev_ptmx+:} false; then :
15565 $as_echo_n "(cached) " >&6
15566else
15567 test "$cross_compiling" = yes &&
15568 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15569if test -r "/dev/ptmx"; then
15570 ac_cv_file__dev_ptmx=yes
15571else
15572 ac_cv_file__dev_ptmx=no
15573fi
15574fi
15575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15576$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15577if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015578
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015579fi
15580
15581if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015584
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15587$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015588if ${ac_cv_file__dev_ptc+:} false; then :
15589 $as_echo_n "(cached) " >&6
15590else
15591 test "$cross_compiling" = yes &&
15592 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15593if test -r "/dev/ptc"; then
15594 ac_cv_file__dev_ptc=yes
15595else
15596 ac_cv_file__dev_ptc=no
15597fi
15598fi
15599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15600$as_echo "$ac_cv_file__dev_ptc" >&6; }
15601if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015602
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015603fi
15604
15605if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015606
Matthias Kloseb9621712010-04-24 17:59:49 +000015607$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015608
Neal Norwitz865400f2003-03-21 01:42:58 +000015609fi
15610
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015612$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015613if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015615else
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015617 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015618if test x$GCC = xyes; then
15619save_CFLAGS=$CFLAGS
15620CFLAGS="$CFLAGS -Werror -Wformat"
15621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015622/* end confdefs.h. */
15623
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015624#include <stdio.h>
15625#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015626
15627int
15628main ()
15629{
15630
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015631char *buffer;
15632sprintf(buffer, "%lld", (long long)123);
15633sprintf(buffer, "%lld", (long long)-123);
15634sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015635
15636 ;
15637 return 0;
15638}
15639_ACEOF
15640if ac_fn_c_try_compile "$LINENO"; then :
15641 ac_cv_have_long_long_format=yes
15642
15643fi
15644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015645CFLAGS=$save_CFLAGS
15646fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015647else
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015649/* end confdefs.h. */
15650
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015651#include <stdio.h>
15652#include <stddef.h>
15653#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015654
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015655#ifdef HAVE_SYS_TYPES_H
15656#include <sys/types.h>
15657#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015658
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015659int main()
15660{
15661char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015662
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015663if (sprintf(buffer, "%lld", (long long)123) < 0)
15664return 1;
15665if (strcmp(buffer, "123"))
15666return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015667
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015668if (sprintf(buffer, "%lld", (long long)-123) < 0)
15669return 1;
15670if (strcmp(buffer, "-123"))
15671return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015672
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015673if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15674return 1;
15675if (strcmp(buffer, "123"))
15676return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015677
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015678return 0;
15679}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015680
15681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015682if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015683 ac_cv_have_long_long_format=yes
15684else
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015689fi
15690
15691
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015692fi
15693
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015695$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015696
Mark Dickinson89d7d412009-12-31 20:50:59 +000015697if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015698then
15699
Matthias Kloseb9621712010-04-24 17:59:49 +000015700$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015701
15702fi
15703
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015704if test $ac_sys_system = Darwin
15705then
15706 LIBS="$LIBS -framework CoreFoundation"
15707fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015708
Matthias Kloseb9621712010-04-24 17:59:49 +000015709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15710$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015711if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015713else
Matthias Kloseb9621712010-04-24 17:59:49 +000015714 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015715 ac_cv_have_size_t_format="cross -- assuming yes"
15716
Thomas Wouters477c8d52006-05-27 19:21:47 +000015717else
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015719/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015720
Thomas Wouters477c8d52006-05-27 19:21:47 +000015721#include <stdio.h>
15722#include <stddef.h>
15723#include <string.h>
15724
Christian Heimes2c181612007-12-17 20:04:13 +000015725#ifdef HAVE_SYS_TYPES_H
15726#include <sys/types.h>
15727#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015728
15729#ifdef HAVE_SSIZE_T
15730typedef ssize_t Py_ssize_t;
15731#elif SIZEOF_VOID_P == SIZEOF_LONG
15732typedef long Py_ssize_t;
15733#else
15734typedef int Py_ssize_t;
15735#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015736
Christian Heimes2c181612007-12-17 20:04:13 +000015737int main()
15738{
15739 char buffer[256];
15740
Thomas Wouters477c8d52006-05-27 19:21:47 +000015741 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15742 return 1;
15743
Thomas Wouters89f507f2006-12-13 04:49:30 +000015744 if (strcmp(buffer, "123"))
15745 return 1;
15746
15747 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15748 return 1;
15749
15750 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015751 return 1;
15752
15753 return 0;
15754}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015755
Thomas Wouters477c8d52006-05-27 19:21:47 +000015756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015757if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015758 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015759else
Matthias Kloseb9621712010-04-24 17:59:49 +000015760 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015764fi
15765
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15768$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015769if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015770
Matthias Kloseb9621712010-04-24 17:59:49 +000015771$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015772
15773fi
15774
Matthias Kloseb9621712010-04-24 17:59:49 +000015775ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015776#ifdef HAVE_SYS_TYPES_H
15777#include <sys/types.h>
15778#endif
15779#ifdef HAVE_SYS_SOCKET_H
15780#include <sys/socket.h>
15781#endif
15782
Matthias Kloseb9621712010-04-24 17:59:49 +000015783"
Victor Stinnere0be4232011-10-25 13:06:09 +020015784if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015785
Martin v. Löwis11437992002-04-12 09:54:03 +000015786else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015789
15790fi
15791
Michael W. Hudson54241132001-12-07 15:38:26 +000015792
Matthias Kloseb9621712010-04-24 17:59:49 +000015793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15794$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015795if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015796 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015797else
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015799 ac_cv_broken_mbstowcs=no
15800else
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015802/* end confdefs.h. */
15803
Stefan Krah19c21392012-11-22 23:47:32 +010015804#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015805#include<stdlib.h>
15806int main() {
15807 size_t len = -1;
15808 const char *str = "text";
15809 len = mbstowcs(NULL, str, 0);
15810 return (len != 4);
15811}
15812
15813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015814if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015815 ac_cv_broken_mbstowcs=no
15816else
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15820 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015821fi
15822
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015823fi
15824
Matthias Kloseb9621712010-04-24 17:59:49 +000015825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15826$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015827if test "$ac_cv_broken_mbstowcs" = yes
15828then
15829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015831
15832fi
15833
Antoine Pitroub52ec782009-01-25 16:34:23 +000015834# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15836$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015837
15838# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015839if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015840 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015841if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015842then
15843
Matthias Kloseb9621712010-04-24 17:59:49 +000015844$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015845
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15847$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015848fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015849if test "$withval" = no
15850then
15851
15852$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15853
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15855$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015856fi
15857
Antoine Pitrou042b1282010-08-13 21:15:58 +000015858else
15859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15860$as_echo "no value specified" >&6; }
15861fi
15862
Antoine Pitroub52ec782009-01-25 16:34:23 +000015863
Matthias Kloseb17289e2012-03-15 19:51:34 +010015864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15865$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15866if ${ac_cv_computed_gotos+:} false; then :
15867 $as_echo_n "(cached) " >&6
15868else
15869 if test "$cross_compiling" = yes; then :
15870 if test "${with_computed_gotos+set}" = set; then
15871 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15872 else
15873 ac_cv_computed_gotos=no
15874 fi
15875else
15876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877/* end confdefs.h. */
15878
15879int main(int argc, char **argv)
15880{
15881 static void *targets[1] = { &&LABEL1 };
15882 goto LABEL2;
15883LABEL1:
15884 return 0;
15885LABEL2:
15886 goto *targets[0];
15887 return 1;
15888}
15889
15890_ACEOF
15891if ac_fn_c_try_run "$LINENO"; then :
15892 ac_cv_computed_gotos=yes
15893else
15894 ac_cv_computed_gotos=no
15895fi
15896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15897 conftest.$ac_objext conftest.beam conftest.$ac_ext
15898fi
15899
15900fi
15901
15902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15903$as_echo "$ac_cv_computed_gotos" >&6; }
15904case "$ac_cv_computed_gotos" in yes*)
15905
15906$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15907
15908esac
15909
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015910case $ac_sys_system in
15911AIX*)
15912
15913$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15914 ;;
15915esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015916
Michael W. Hudson54241132001-12-07 15:38:26 +000015917
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015918
15919
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015920for h in `(cd $srcdir;echo Python/thread_*.h)`
15921do
15922 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15923done
15924
Michael W. Hudson54241132001-12-07 15:38:26 +000015925
Ned Deily0db50cf2014-07-25 12:41:31 -070015926SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15928$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015929for dir in $SRCDIRS; do
15930 if test ! -d $dir; then
15931 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015932 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015933done
Matthias Kloseb9621712010-04-24 17:59:49 +000015934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15935$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015936
Stefan Krah1919b7e2012-03-21 18:25:23 +010015937# Availability of -O2:
15938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15939$as_echo_n "checking for -O2... " >&6; }
15940saved_cflags="$CFLAGS"
15941CFLAGS="-O2"
15942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15943/* end confdefs.h. */
15944
15945int
15946main ()
15947{
15948
15949
15950 ;
15951 return 0;
15952}
15953_ACEOF
15954if ac_fn_c_try_compile "$LINENO"; then :
15955 have_O2=yes
15956else
15957 have_O2=no
15958fi
15959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15961$as_echo "$have_O2" >&6; }
15962CFLAGS="$saved_cflags"
15963
15964# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15965# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15967$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15968saved_cflags="$CFLAGS"
15969CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15970if test "$have_O2" = no; then
15971 CFLAGS=""
15972fi
15973if test "$cross_compiling" = yes; then :
15974 have_glibc_memmove_bug=undefined
15975else
15976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15977/* end confdefs.h. */
15978
15979#include <stdio.h>
15980#include <stdlib.h>
15981#include <string.h>
15982void foo(void *p, void *q) { memmove(p, q, 19); }
15983int main() {
15984 char a[32] = "123456789000000000";
15985 foo(&a[9], a);
15986 if (strcmp(a, "123456789123456789000000000") != 0)
15987 return 1;
15988 foo(a, &a[9]);
15989 if (strcmp(a, "123456789000000000") != 0)
15990 return 1;
15991 return 0;
15992}
15993
15994_ACEOF
15995if ac_fn_c_try_run "$LINENO"; then :
15996 have_glibc_memmove_bug=no
15997else
15998 have_glibc_memmove_bug=yes
15999fi
16000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16001 conftest.$ac_objext conftest.beam conftest.$ac_ext
16002fi
16003
16004CFLAGS="$saved_cflags"
16005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16006$as_echo "$have_glibc_memmove_bug" >&6; }
16007if test "$have_glibc_memmove_bug" = yes; then
16008
16009$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16010
16011fi
16012
16013if test "$have_gcc_asm_for_x87" = yes; then
16014 # Some versions of gcc miscompile inline asm:
16015 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16016 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16017 case $CC in
16018 *gcc*)
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16020$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16021 saved_cflags="$CFLAGS"
16022 CFLAGS="-O2"
16023 if test "$cross_compiling" = yes; then :
16024 have_ipa_pure_const_bug=undefined
16025else
16026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16027/* end confdefs.h. */
16028
16029 __attribute__((noinline)) int
16030 foo(int *p) {
16031 int r;
16032 asm ( "movl \$6, (%1)\n\t"
16033 "xorl %0, %0\n\t"
16034 : "=r" (r) : "r" (p) : "memory"
16035 );
16036 return r;
16037 }
16038 int main() {
16039 int p = 8;
16040 if ((foo(&p) ? : p) != 6)
16041 return 1;
16042 return 0;
16043 }
16044
16045_ACEOF
16046if ac_fn_c_try_run "$LINENO"; then :
16047 have_ipa_pure_const_bug=no
16048else
16049 have_ipa_pure_const_bug=yes
16050fi
16051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16052 conftest.$ac_objext conftest.beam conftest.$ac_ext
16053fi
16054
16055 CFLAGS="$saved_cflags"
16056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16057$as_echo "$have_ipa_pure_const_bug" >&6; }
16058 if test "$have_ipa_pure_const_bug" = yes; then
16059
16060$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16061
16062 fi
16063 ;;
16064 esac
16065fi
16066
Victor Stinner4f5366e2015-01-09 02:13:19 +010016067# Check for stdatomic.h
16068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16069$as_echo_n "checking for stdatomic.h... " >&6; }
16070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16071/* end confdefs.h. */
16072
16073
16074 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016075 atomic_int value = ATOMIC_VAR_INIT(1);
16076 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016077 int main() {
16078 int loaded_value = atomic_load(&value);
16079 return 0;
16080 }
16081
16082
16083_ACEOF
16084if ac_fn_c_try_link "$LINENO"; then :
16085 have_stdatomic_h=yes
16086else
16087 have_stdatomic_h=no
16088fi
16089rm -f core conftest.err conftest.$ac_objext \
16090 conftest$ac_exeext conftest.$ac_ext
16091
16092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16093$as_echo "$have_stdatomic_h" >&6; }
16094
16095if test "$have_stdatomic_h" = yes; then
16096
16097$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16098
16099fi
16100
16101# Check for GCC >= 4.7 __atomic builtins
16102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16103$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16105/* end confdefs.h. */
16106
16107
16108 volatile int val = 1;
16109 int main() {
16110 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16111 return 0;
16112 }
16113
16114
16115_ACEOF
16116if ac_fn_c_try_link "$LINENO"; then :
16117 have_builtin_atomic=yes
16118else
16119 have_builtin_atomic=no
16120fi
16121rm -f core conftest.err conftest.$ac_objext \
16122 conftest$ac_exeext conftest.$ac_ext
16123
16124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16125$as_echo "$have_builtin_atomic" >&6; }
16126
16127if test "$have_builtin_atomic" = yes; then
16128
16129$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16130
16131fi
16132
Ned Deily322f5ba2013-11-21 23:01:59 -080016133# ensurepip option
16134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16135$as_echo_n "checking for ensurepip... " >&6; }
16136
16137# Check whether --with-ensurepip was given.
16138if test "${with_ensurepip+set}" = set; then :
16139 withval=$with_ensurepip;
16140else
16141 with_ensurepip=upgrade
16142fi
16143
16144case $with_ensurepip in #(
16145 yes|upgrade) :
16146 ENSUREPIP=upgrade ;; #(
16147 install) :
16148 ENSUREPIP=install ;; #(
16149 no) :
16150 ENSUREPIP=no ;; #(
16151 *) :
16152 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16153esac
16154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16155$as_echo "$ENSUREPIP" >&6; }
16156
16157
Victor Stinner35a97c02015-03-08 02:59:09 +010016158# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16160$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16162/* end confdefs.h. */
16163
16164
16165 #include <dirent.h>
16166
16167 int main() {
16168 struct dirent entry;
16169 return entry.d_type == DT_UNKNOWN;
16170 }
16171
16172
16173_ACEOF
16174if ac_fn_c_try_link "$LINENO"; then :
16175 have_dirent_d_type=yes
16176else
16177 have_dirent_d_type=no
16178fi
16179rm -f core conftest.err conftest.$ac_objext \
16180 conftest$ac_exeext conftest.$ac_ext
16181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16182$as_echo "$have_dirent_d_type" >&6; }
16183
16184if test "$have_dirent_d_type" = yes; then
16185
16186$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16187
16188fi
16189
Victor Stinner9eb57c52015-03-19 22:21:49 +010016190# check if the Linux getrandom() syscall is available
16191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16192$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16194/* end confdefs.h. */
16195
16196
Victor Stinner1b80b242016-04-12 22:34:58 +020016197 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016198 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016199 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016200
16201 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016202 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016203 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016204 const int flags = GRND_NONBLOCK;
16205 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016206 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016207 return 0;
16208 }
16209
16210
16211_ACEOF
16212if ac_fn_c_try_link "$LINENO"; then :
16213 have_getrandom_syscall=yes
16214else
16215 have_getrandom_syscall=no
16216fi
16217rm -f core conftest.err conftest.$ac_objext \
16218 conftest$ac_exeext conftest.$ac_ext
16219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16220$as_echo "$have_getrandom_syscall" >&6; }
16221
16222if test "$have_getrandom_syscall" = yes; then
16223
16224$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16225
16226fi
16227
Victor Stinner3abf44e2015-09-18 15:38:37 +020016228# check if the getrandom() function is available
16229# the test was written for the Solaris function of <sys/random.h>
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16231$as_echo_n "checking for the getrandom() function... " >&6; }
16232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16233/* end confdefs.h. */
16234
16235
16236 #include <sys/random.h>
16237
16238 int main() {
16239 char buffer[1];
16240 const size_t buflen = sizeof(buffer);
16241 const int flags = 0;
16242 /* ignore the result, Python checks for ENOSYS at runtime */
16243 (void)getrandom(buffer, buflen, flags);
16244 return 0;
16245 }
16246
16247
16248_ACEOF
16249if ac_fn_c_try_link "$LINENO"; then :
16250 have_getrandom=yes
16251else
16252 have_getrandom=no
16253fi
16254rm -f core conftest.err conftest.$ac_objext \
16255 conftest$ac_exeext conftest.$ac_ext
16256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16257$as_echo "$have_getrandom" >&6; }
16258
16259if test "$have_getrandom" = yes; then
16260
16261$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16262
16263fi
16264
Guido van Rossum627b2d71993-12-24 10:39:16 +000016265# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016266ac_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 +000016267
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016268ac_config_files="$ac_config_files Modules/ld_so_aix"
16269
Martin v. Löwis11437992002-04-12 09:54:03 +000016270cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016271# This file is a shell script that caches the results of configure
16272# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016273# scripts and configure runs, see configure's option --config-cache.
16274# It is not useful on other systems. If it contains results you don't
16275# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016276#
Martin v. Löwis11437992002-04-12 09:54:03 +000016277# config.status only pays attention to the cache file if you give it
16278# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016279#
Skip Montanaro6dead952003-09-25 14:50:04 +000016280# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016281# loading this file, other *unset* `ac_cv_foo' will be assigned the
16282# following values.
16283
16284_ACEOF
16285
Guido van Rossumf78abae1997-01-21 22:02:36 +000016286# The following way of writing the cache mishandles newlines in values,
16287# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016289# Ultrix sh set writes to stderr and can't be redirected directly,
16290# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291(
16292 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16293 eval ac_val=\$$ac_var
16294 case $ac_val in #(
16295 *${as_nl}*)
16296 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016297 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16298$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299 esac
16300 case $ac_var in #(
16301 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016302 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16303 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 esac ;;
16305 esac
16306 done
16307
Martin v. Löwis11437992002-04-12 09:54:03 +000016308 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16310 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016311 # `set' does not quote correctly, so add quotes: double-quote
16312 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016314 "s/'/'\\\\''/g;
16315 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 *)
16318 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321 esac |
16322 sort
16323) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016325 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16329 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16331 :end' >>confcache
16332if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16333 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016334 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016335 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16336$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016337 if test ! -f "$cache_file" || test -h "$cache_file"; then
16338 cat confcache >"$cache_file"
16339 else
16340 case $cache_file in #(
16341 */* | ?:*)
16342 mv -f confcache "$cache_file"$$ &&
16343 mv -f "$cache_file"$$ "$cache_file" ;; #(
16344 *)
16345 mv -f confcache "$cache_file" ;;
16346 esac
16347 fi
16348 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016349 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016350 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16351$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016352 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016353fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016354rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016355
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016356test "x$prefix" = xNONE && prefix=$ac_default_prefix
16357# Let make expand exec_prefix.
16358test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016359
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016360DEFS=-DHAVE_CONFIG_H
16361
Skip Montanaro6dead952003-09-25 14:50:04 +000016362ac_libobjs=
16363ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016364U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016365for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16366 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016368 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016369 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16370 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16372 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016373done
16374LIBOBJS=$ac_libobjs
16375
16376LTLIBOBJS=$ac_ltlibobjs
16377
16378
Martin v. Löwis11437992002-04-12 09:54:03 +000016379
Matthias Kloseb9621712010-04-24 17:59:49 +000016380
Victor Stinnere0be4232011-10-25 13:06:09 +020016381: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016382ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016383ac_clean_files_save=$ac_clean_files
16384ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016385{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16386$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16387as_write_fail=0
16388cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016389#! $SHELL
16390# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016391# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016392# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016393# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016394
Martin v. Löwis11437992002-04-12 09:54:03 +000016395debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016396ac_cs_recheck=false
16397ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016398
Matthias Kloseb9621712010-04-24 17:59:49 +000016399SHELL=\${CONFIG_SHELL-$SHELL}
16400export SHELL
16401_ASEOF
16402cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16403## -------------------- ##
16404## M4sh Initialization. ##
16405## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407# Be more Bourne compatible
16408DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016409if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 emulate sh
16411 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016412 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016413 # is contrary to our usage. Disable this feature.
16414 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016416else
Matthias Kloseb9621712010-04-24 17:59:49 +000016417 case `(set -o) 2>/dev/null` in #(
16418 *posix*) :
16419 set -o posix ;; #(
16420 *) :
16421 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016423fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016424
16425
Matthias Kloseb9621712010-04-24 17:59:49 +000016426as_nl='
16427'
16428export as_nl
16429# Printing a long string crashes Solaris 7 /usr/bin/printf.
16430as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16431as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16432as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16433# Prefer a ksh shell builtin over an external printf program on Solaris,
16434# but without wasting forks for bash or zsh.
16435if test -z "$BASH_VERSION$ZSH_VERSION" \
16436 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16437 as_echo='print -r --'
16438 as_echo_n='print -rn --'
16439elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16440 as_echo='printf %s\n'
16441 as_echo_n='printf %s'
16442else
16443 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16444 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16445 as_echo_n='/usr/ucb/echo -n'
16446 else
16447 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16448 as_echo_n_body='eval
16449 arg=$1;
16450 case $arg in #(
16451 *"$as_nl"*)
16452 expr "X$arg" : "X\\(.*\\)$as_nl";
16453 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16454 esac;
16455 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16456 '
16457 export as_echo_n_body
16458 as_echo_n='sh -c $as_echo_n_body as_echo'
16459 fi
16460 export as_echo_body
16461 as_echo='sh -c $as_echo_body as_echo'
16462fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016463
16464# The user is always right.
16465if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016466 PATH_SEPARATOR=:
16467 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16468 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16469 PATH_SEPARATOR=';'
16470 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016473
16474# IFS
16475# We need space, tab and new line, in precisely that order. Quoting is
16476# there to prevent editors from complaining about space-tab.
16477# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16478# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479IFS=" "" $as_nl"
16480
16481# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016482as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016483case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016484 *[\\/]* ) as_myself=$0 ;;
16485 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016486for as_dir in $PATH
16487do
16488 IFS=$as_save_IFS
16489 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016490 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16491 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016492IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494 ;;
16495esac
16496# We did not find ourselves, most probably we were run as `sh COMMAND'
16497# in which case we are not to be found in the path.
16498if test "x$as_myself" = x; then
16499 as_myself=$0
16500fi
16501if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016502 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16503 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016504fi
16505
Matthias Kloseb9621712010-04-24 17:59:49 +000016506# Unset variables that we do not need and which cause bugs (e.g. in
16507# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16508# suppresses any "Segmentation fault" message there. '((' could
16509# trigger a bug in pdksh 5.2.14.
16510for as_var in BASH_ENV ENV MAIL MAILPATH
16511do eval test x\${$as_var+set} = xset \
16512 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513done
16514PS1='$ '
16515PS2='> '
16516PS4='+ '
16517
16518# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016519LC_ALL=C
16520export LC_ALL
16521LANGUAGE=C
16522export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523
Matthias Kloseb9621712010-04-24 17:59:49 +000016524# CDPATH.
16525(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16526
16527
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016528# as_fn_error STATUS ERROR [LINENO LOG_FD]
16529# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016530# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16531# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016532# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016533as_fn_error ()
16534{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016535 as_status=$1; test $as_status -eq 0 && as_status=1
16536 if test "$4"; then
16537 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16538 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016539 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016540 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016541 as_fn_exit $as_status
16542} # as_fn_error
16543
16544
16545# as_fn_set_status STATUS
16546# -----------------------
16547# Set $? to STATUS, without forking.
16548as_fn_set_status ()
16549{
16550 return $1
16551} # as_fn_set_status
16552
16553# as_fn_exit STATUS
16554# -----------------
16555# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16556as_fn_exit ()
16557{
16558 set +e
16559 as_fn_set_status $1
16560 exit $1
16561} # as_fn_exit
16562
16563# as_fn_unset VAR
16564# ---------------
16565# Portably unset VAR.
16566as_fn_unset ()
16567{
16568 { eval $1=; unset $1;}
16569}
16570as_unset=as_fn_unset
16571# as_fn_append VAR VALUE
16572# ----------------------
16573# Append the text in VALUE to the end of the definition contained in VAR. Take
16574# advantage of any shell optimizations that allow amortized linear growth over
16575# repeated appends, instead of the typical quadratic growth present in naive
16576# implementations.
16577if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16578 eval 'as_fn_append ()
16579 {
16580 eval $1+=\$2
16581 }'
16582else
16583 as_fn_append ()
16584 {
16585 eval $1=\$$1\$2
16586 }
16587fi # as_fn_append
16588
16589# as_fn_arith ARG...
16590# ------------------
16591# Perform arithmetic evaluation on the ARGs, and store the result in the
16592# global $as_val. Take advantage of shells that can avoid forks. The arguments
16593# must be portable across $(()) and expr.
16594if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16595 eval 'as_fn_arith ()
16596 {
16597 as_val=$(( $* ))
16598 }'
16599else
16600 as_fn_arith ()
16601 {
16602 as_val=`expr "$@" || test $? -eq 1`
16603 }
16604fi # as_fn_arith
16605
16606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607if expr a : '\(a\)' >/dev/null 2>&1 &&
16608 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16609 as_expr=expr
16610else
16611 as_expr=false
16612fi
16613
16614if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16615 as_basename=basename
16616else
16617 as_basename=false
16618fi
16619
Matthias Kloseb9621712010-04-24 17:59:49 +000016620if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16621 as_dirname=dirname
16622else
16623 as_dirname=false
16624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626as_me=`$as_basename -- "$0" ||
16627$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16628 X"$0" : 'X\(//\)$' \| \
16629 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016630$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 sed '/^.*\/\([^/][^/]*\)\/*$/{
16632 s//\1/
16633 q
16634 }
16635 /^X\/\(\/\/\)$/{
16636 s//\1/
16637 q
16638 }
16639 /^X\/\(\/\).*/{
16640 s//\1/
16641 q
16642 }
16643 s/.*/./; q'`
16644
Matthias Kloseb9621712010-04-24 17:59:49 +000016645# Avoid depending upon Character Ranges.
16646as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16647as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16648as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16649as_cr_digits='0123456789'
16650as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651
16652ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016653case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016655 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016657 xy) ECHO_C='\c';;
16658 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16659 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660 esac;;
16661*)
16662 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016663esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016664
Martin v. Löwis11437992002-04-12 09:54:03 +000016665rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016666if test -d conf$$.dir; then
16667 rm -f conf$$.dir/conf$$.file
16668else
16669 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016670 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016672if (echo >conf$$.file) 2>/dev/null; then
16673 if ln -s conf$$.file conf$$ 2>/dev/null; then
16674 as_ln_s='ln -s'
16675 # ... but there are two gotchas:
16676 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16677 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016678 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016679 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016680 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016681 elif ln conf$$.file conf$$ 2>/dev/null; then
16682 as_ln_s=ln
16683 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016684 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016686else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016687 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16690rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016691
Matthias Kloseb9621712010-04-24 17:59:49 +000016692
16693# as_fn_mkdir_p
16694# -------------
16695# Create "$as_dir" as a directory, including parents if necessary.
16696as_fn_mkdir_p ()
16697{
16698
16699 case $as_dir in #(
16700 -*) as_dir=./$as_dir;;
16701 esac
16702 test -d "$as_dir" || eval $as_mkdir_p || {
16703 as_dirs=
16704 while :; do
16705 case $as_dir in #(
16706 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16707 *) as_qdir=$as_dir;;
16708 esac
16709 as_dirs="'$as_qdir' $as_dirs"
16710 as_dir=`$as_dirname -- "$as_dir" ||
16711$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16712 X"$as_dir" : 'X\(//\)[^/]' \| \
16713 X"$as_dir" : 'X\(//\)$' \| \
16714 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16715$as_echo X"$as_dir" |
16716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16717 s//\1/
16718 q
16719 }
16720 /^X\(\/\/\)[^/].*/{
16721 s//\1/
16722 q
16723 }
16724 /^X\(\/\/\)$/{
16725 s//\1/
16726 q
16727 }
16728 /^X\(\/\).*/{
16729 s//\1/
16730 q
16731 }
16732 s/.*/./; q'`
16733 test -d "$as_dir" && break
16734 done
16735 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016736 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016737
16738
16739} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016740if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016741 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016742else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016743 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016744 as_mkdir_p=false
16745fi
16746
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016747
16748# as_fn_executable_p FILE
16749# -----------------------
16750# Test if FILE is an executable regular file.
16751as_fn_executable_p ()
16752{
16753 test -f "$1" && test -x "$1"
16754} # as_fn_executable_p
16755as_test_x='test -x'
16756as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016757
16758# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016759as_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 +000016760
16761# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016762as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016763
16764
Martin v. Löwis11437992002-04-12 09:54:03 +000016765exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016766## ----------------------------------- ##
16767## Main body of $CONFIG_STATUS script. ##
16768## ----------------------------------- ##
16769_ASEOF
16770test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016771
Matthias Kloseb9621712010-04-24 17:59:49 +000016772cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16773# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016774# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016775# values after options handling.
16776ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016777This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016778generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016779
16780 CONFIG_FILES = $CONFIG_FILES
16781 CONFIG_HEADERS = $CONFIG_HEADERS
16782 CONFIG_LINKS = $CONFIG_LINKS
16783 CONFIG_COMMANDS = $CONFIG_COMMANDS
16784 $ $0 $@
16785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786on `(hostname || uname -n) 2>/dev/null | sed 1q`
16787"
16788
Martin v. Löwis11437992002-04-12 09:54:03 +000016789_ACEOF
16790
Matthias Kloseb9621712010-04-24 17:59:49 +000016791case $ac_config_files in *"
16792"*) set x $ac_config_files; shift; ac_config_files=$*;;
16793esac
16794
16795case $ac_config_headers in *"
16796"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16797esac
16798
16799
16800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016801# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016802config_files="$ac_config_files"
16803config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016805_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016806
Matthias Kloseb9621712010-04-24 17:59:49 +000016807cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016808ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016809\`$as_me' instantiates files and other configuration actions
16810from templates according to the current configuration. Unless the files
16811and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016812
Matthias Kloseb9621712010-04-24 17:59:49 +000016813Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016814
16815 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016817 --config print configuration, then exit
16818 -q, --quiet, --silent
16819 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 -d, --debug don't remove temporary files
16821 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016822 --file=FILE[:TEMPLATE]
16823 instantiate the configuration file FILE
16824 --header=FILE[:TEMPLATE]
16825 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016826
16827Configuration files:
16828$config_files
16829
16830Configuration headers:
16831$config_headers
16832
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016833Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016836cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16837ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016838ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016839python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016840configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016841 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016842
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016843Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016844This config.status script is free software; the Free Software Foundation
16845gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016846
16847ac_pwd='$ac_pwd'
16848srcdir='$srcdir'
16849INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016850MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016851test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016852_ACEOF
16853
Matthias Kloseb9621712010-04-24 17:59:49 +000016854cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16855# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016856ac_need_defaults=:
16857while test $# != 0
16858do
16859 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016860 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16862 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016863 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016864 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016865 --*=)
16866 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16867 ac_optarg=
16868 ac_shift=:
16869 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016870 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016871 ac_option=$1
16872 ac_optarg=$2
16873 ac_shift=shift
16874 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016875 esac
16876
Skip Montanaro6dead952003-09-25 14:50:04 +000016877 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016879 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16880 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016882 $as_echo "$ac_cs_version"; exit ;;
16883 --config | --confi | --conf | --con | --co | --c )
16884 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016886 debug=: ;;
16887 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016888 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016889 case $ac_optarg in
16890 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016891 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016892 esac
16893 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 ac_need_defaults=false;;
16895 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016896 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016897 case $ac_optarg in
16898 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16899 esac
16900 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 --he | --h)
16903 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016904 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016905Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016906 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016907 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016908 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16909 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16910 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016911
16912 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016913 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016914Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016915
Matthias Kloseb9621712010-04-24 17:59:49 +000016916 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016918
16919 esac
16920 shift
16921done
16922
Skip Montanaro6dead952003-09-25 14:50:04 +000016923ac_configure_extra_args=
16924
16925if $ac_cs_silent; then
16926 exec 6>/dev/null
16927 ac_configure_extra_args="$ac_configure_extra_args --silent"
16928fi
16929
16930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016932if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016933 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016934 shift
16935 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16936 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016937 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016938 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016939fi
16940
Martin v. Löwis11437992002-04-12 09:54:03 +000016941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943exec 5>>config.log
16944{
16945 echo
16946 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16947## Running $as_me. ##
16948_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016949 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016953cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016954_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016955
Matthias Kloseb9621712010-04-24 17:59:49 +000016956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957
16958# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016959for ac_config_target in $ac_config_targets
16960do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961 case $ac_config_target in
16962 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16963 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16964 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016965 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16966 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16968 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016969 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016970 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016971 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972
Victor Stinnere0be4232011-10-25 13:06:09 +020016973 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016974 esac
16975done
16976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016977
Martin v. Löwis11437992002-04-12 09:54:03 +000016978# If the user did not use the arguments to specify the items to instantiate,
16979# then the envvar interface is used. Set only those that are not.
16980# We use the long form for the default assignment because of an extremely
16981# bizarre bug on SunOS 4.1.3.
16982if $ac_need_defaults; then
16983 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16984 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16985fi
16986
Skip Montanaro6dead952003-09-25 14:50:04 +000016987# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016989# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016990# Hook for its removal unless debugging.
16991# Note that there is a small window in which the directory will not be cleaned:
16992# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016993$debug ||
16994{
Victor Stinnere0be4232011-10-25 13:06:09 +020016995 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016997 : "${ac_tmp:=$tmp}"
16998 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017000 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017001}
Martin v. Löwis11437992002-04-12 09:54:03 +000017002# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017003
Martin v. Löwis11437992002-04-12 09:54:03 +000017004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017006 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017007} ||
17008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009 tmp=./conf$$-$RANDOM
17010 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017011} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017012ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017013
Matthias Kloseb9621712010-04-24 17:59:49 +000017014# Set up the scripts for CONFIG_FILES section.
17015# No need to generate them if there are no CONFIG_FILES.
17016# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017018
Matthias Kloseb9621712010-04-24 17:59:49 +000017019
17020ac_cr=`echo X | tr X '\015'`
17021# On cygwin, bash can eat \r inside `` if the user requested igncr.
17022# But we know of no other shell where ac_cr would be empty at this
17023# point, so we can use a bashism as a fallback.
17024if test "x$ac_cr" = x; then
17025 eval ac_cr=\$\'\\r\'
17026fi
17027ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17028if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017029 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017030else
17031 ac_cs_awk_cr=$ac_cr
17032fi
17033
Victor Stinnere0be4232011-10-25 13:06:09 +020017034echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017035_ACEOF
17036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037
Matthias Kloseb9621712010-04-24 17:59:49 +000017038{
17039 echo "cat >conf$$subs.awk <<_ACEOF" &&
17040 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17041 echo "_ACEOF"
17042} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017043 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17044ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045ac_delim='%!_!# '
17046for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017047 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017048 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017049
Matthias Kloseb9621712010-04-24 17:59:49 +000017050 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17051 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052 break
17053 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017054 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055 else
17056 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017057 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058done
Matthias Kloseb9621712010-04-24 17:59:49 +000017059rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060
Matthias Kloseb9621712010-04-24 17:59:49 +000017061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017062cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017064sed -n '
17065h
17066s/^/S["/; s/!.*/"]=/
17067p
17068g
17069s/^[^!]*!//
17070:repl
17071t repl
17072s/'"$ac_delim"'$//
17073t delim
17074:nl
17075h
17076s/\(.\{148\}\)..*/\1/
17077t more1
17078s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17079p
17080n
17081b repl
17082:more1
17083s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17084p
17085g
17086s/.\{148\}//
17087t nl
17088:delim
17089h
17090s/\(.\{148\}\)..*/\1/
17091t more2
17092s/["\\]/\\&/g; s/^/"/; s/$/"/
17093p
17094b
17095:more2
17096s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17097p
17098g
17099s/.\{148\}//
17100t delim
17101' <conf$$subs.awk | sed '
17102/^[^""]/{
17103 N
17104 s/\n//
17105}
17106' >>$CONFIG_STATUS || ac_write_fail=1
17107rm -f conf$$subs.awk
17108cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17109_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017110cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017111 for (key in S) S_is_set[key] = 1
17112 FS = ""
17113
17114}
17115{
17116 line = $ 0
17117 nfields = split(line, field, "@")
17118 substed = 0
17119 len = length(field[1])
17120 for (i = 2; i < nfields; i++) {
17121 key = field[i]
17122 keylen = length(key)
17123 if (S_is_set[key]) {
17124 value = S[key]
17125 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17126 len += length(value) + length(field[++i])
17127 substed = 1
17128 } else
17129 len += 1 + keylen
17130 }
17131
17132 print line
17133}
17134
17135_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017137cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17138if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17139 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17140else
17141 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017142fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017143 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017144_ACEOF
17145
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017146# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17147# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017148# trailing colons and then remove the whole line if VPATH becomes empty
17149# (actually we leave an empty line to preserve line numbers).
17150if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017151 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17152h
17153s///
17154s/^/:/
17155s/[ ]*$/:/
17156s/:\$(srcdir):/:/g
17157s/:\${srcdir}:/:/g
17158s/:@srcdir@:/:/g
17159s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017161x
17162s/\(=[ ]*\).*/\1/
17163G
17164s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017165s/^[^=]*=[ ]*$//
17166}'
17167fi
17168
Matthias Kloseb9621712010-04-24 17:59:49 +000017169cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017170fi # test -n "$CONFIG_FILES"
17171
Matthias Kloseb9621712010-04-24 17:59:49 +000017172# Set up the scripts for CONFIG_HEADERS section.
17173# No need to generate them if there are no CONFIG_HEADERS.
17174# This happens for instance with `./config.status Makefile'.
17175if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017176cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017177BEGIN {
17178_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017179
Matthias Kloseb9621712010-04-24 17:59:49 +000017180# Transform confdefs.h into an awk script `defines.awk', embedded as
17181# here-document in config.status, that substitutes the proper values into
17182# config.h.in to produce config.h.
17183
17184# Create a delimiter string that does not exist in confdefs.h, to ease
17185# handling of long lines.
17186ac_delim='%!_!# '
17187for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017188 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17189 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017190 break
17191 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017192 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017193 else
17194 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17195 fi
17196done
17197
17198# For the awk script, D is an array of macro values keyed by name,
17199# likewise P contains macro parameters if any. Preserve backslash
17200# newline sequences.
17201
17202ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17203sed -n '
17204s/.\{148\}/&'"$ac_delim"'/g
17205t rset
17206:rset
17207s/^[ ]*#[ ]*define[ ][ ]*/ /
17208t def
17209d
17210:def
17211s/\\$//
17212t bsnl
17213s/["\\]/\\&/g
17214s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17215D["\1"]=" \3"/p
17216s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17217d
17218:bsnl
17219s/["\\]/\\&/g
17220s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17221D["\1"]=" \3\\\\\\n"\\/p
17222t cont
17223s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17224t cont
17225d
17226:cont
17227n
17228s/.\{148\}/&'"$ac_delim"'/g
17229t clear
17230:clear
17231s/\\$//
17232t bsnlc
17233s/["\\]/\\&/g; s/^/"/; s/$/"/p
17234d
17235:bsnlc
17236s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17237b cont
17238' <confdefs.h | sed '
17239s/'"$ac_delim"'/"\\\
17240"/g' >>$CONFIG_STATUS || ac_write_fail=1
17241
17242cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17243 for (key in D) D_is_set[key] = 1
17244 FS = ""
17245}
17246/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17247 line = \$ 0
17248 split(line, arg, " ")
17249 if (arg[1] == "#") {
17250 defundef = arg[2]
17251 mac1 = arg[3]
17252 } else {
17253 defundef = substr(arg[1], 2)
17254 mac1 = arg[2]
17255 }
17256 split(mac1, mac2, "(") #)
17257 macro = mac2[1]
17258 prefix = substr(line, 1, index(line, defundef) - 1)
17259 if (D_is_set[macro]) {
17260 # Preserve the white space surrounding the "#".
17261 print prefix "define", macro P[macro] D[macro]
17262 next
17263 } else {
17264 # Replace #undef with comments. This is necessary, for example,
17265 # in the case of _POSIX_SOURCE, which is predefined and required
17266 # on some systems where configure will not decide to define it.
17267 if (defundef == "undef") {
17268 print "/*", prefix defundef, macro, "*/"
17269 next
17270 }
17271 }
17272}
17273{ print }
17274_ACAWK
17275_ACEOF
17276cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017278fi # test -n "$CONFIG_HEADERS"
17279
17280
17281eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17282shift
17283for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017284do
17285 case $ac_tag in
17286 :[FHLC]) ac_mode=$ac_tag; continue;;
17287 esac
17288 case $ac_mode$ac_tag in
17289 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017290 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291 :[FH]-) ac_tag=-:-;;
17292 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17293 esac
17294 ac_save_IFS=$IFS
17295 IFS=:
17296 set x $ac_tag
17297 IFS=$ac_save_IFS
17298 shift
17299 ac_file=$1
17300 shift
17301
17302 case $ac_mode in
17303 :L) ac_source=$1;;
17304 :[FH])
17305 ac_file_inputs=
17306 for ac_f
17307 do
17308 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017309 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310 *) # Look for the file first in the build tree, then in the source tree
17311 # (if the path is not absolute). The absolute path cannot be DOS-style,
17312 # because $ac_f cannot contain `:'.
17313 test -f "$ac_f" ||
17314 case $ac_f in
17315 [\\/$]*) false;;
17316 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17317 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017318 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017320 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17321 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322 done
17323
17324 # Let's still pretend it is `configure' which instantiates (i.e., don't
17325 # use $as_me), people would be surprised to read:
17326 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017327 configure_input='Generated from '`
17328 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17329 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330 if test x"$ac_file" != x-; then
17331 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017332 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17333$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017335 # Neutralize special characters interpreted by sed in replacement strings.
17336 case $configure_input in #(
17337 *\&* | *\|* | *\\* )
17338 ac_sed_conf_input=`$as_echo "$configure_input" |
17339 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17340 *) ac_sed_conf_input=$configure_input;;
17341 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342
17343 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017344 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17345 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346 esac
17347 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 esac
17349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017351$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017352 X"$ac_file" : 'X\(//\)[^/]' \| \
17353 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017355$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17357 s//\1/
17358 q
17359 }
17360 /^X\(\/\/\)[^/].*/{
17361 s//\1/
17362 q
17363 }
17364 /^X\(\/\/\)$/{
17365 s//\1/
17366 q
17367 }
17368 /^X\(\/\).*/{
17369 s//\1/
17370 q
17371 }
17372 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017373 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017374 ac_builddir=.
17375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376case "$ac_dir" in
17377.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17378*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017379 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017381 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382 case $ac_top_builddir_sub in
17383 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17384 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17385 esac ;;
17386esac
17387ac_abs_top_builddir=$ac_pwd
17388ac_abs_builddir=$ac_pwd$ac_dir_suffix
17389# for backward compatibility:
17390ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017391
17392case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017394 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 ac_top_srcdir=$ac_top_builddir_sub
17396 ac_abs_top_srcdir=$ac_pwd ;;
17397 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399 ac_top_srcdir=$srcdir
17400 ac_abs_top_srcdir=$srcdir ;;
17401 *) # Relative name.
17402 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17403 ac_top_srcdir=$ac_top_build_prefix$srcdir
17404 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017405esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017407
Martin v. Löwis11437992002-04-12 09:54:03 +000017408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 case $ac_mode in
17410 :F)
17411 #
17412 # CONFIG_FILE
17413 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017414
17415 case $INSTALL in
17416 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017418 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017419 ac_MKDIR_P=$MKDIR_P
17420 case $MKDIR_P in
17421 [\\/$]* | ?:[\\/]* ) ;;
17422 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17423 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017424_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425
Matthias Kloseb9621712010-04-24 17:59:49 +000017426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427# If the template does not know about datarootdir, expand it.
17428# FIXME: This hack should be removed a few years after 2.60.
17429ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017430ac_sed_dataroot='
17431/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432 p
17433 q
17434}
17435/@datadir@/p
17436/@docdir@/p
17437/@infodir@/p
17438/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017439/@mandir@/p'
17440case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441*datarootdir*) ac_datarootdir_seen=yes;;
17442*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17444$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017446cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447 ac_datarootdir_hack='
17448 s&@datadir@&$datadir&g
17449 s&@docdir@&$docdir&g
17450 s&@infodir@&$infodir&g
17451 s&@localedir@&$localedir&g
17452 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017453 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454esac
17455_ACEOF
17456
17457# Neutralize VPATH when `$srcdir' = `.'.
17458# Shell code in configure.ac might set extrasub.
17459# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17461ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017462$extrasub
17463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017465:t
17466/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017467s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017468s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017469s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470s&@srcdir@&$ac_srcdir&;t t
17471s&@abs_srcdir@&$ac_abs_srcdir&;t t
17472s&@top_srcdir@&$ac_top_srcdir&;t t
17473s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17474s&@builddir@&$ac_builddir&;t t
17475s&@abs_builddir@&$ac_abs_builddir&;t t
17476s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17477s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017478s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017480"
Victor Stinnere0be4232011-10-25 13:06:09 +020017481eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17482 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017485 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17486 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17487 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017489which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017490$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017491which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017492
Victor Stinnere0be4232011-10-25 13:06:09 +020017493 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017494 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017495 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17496 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017497 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017498 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017499 ;;
17500 :H)
17501 #
17502 # CONFIG_HEADER
17503 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017504 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017505 {
17506 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017507 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17508 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017509 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017510 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17512$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017513 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017514 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017515 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017516 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017517 fi
17518 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017519 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017520 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017521 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017522 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525
17526 esac
17527
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017528
17529 case $ac_file$ac_mode in
17530 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17531
17532 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533done # for ac_tag
17534
Guido van Rossum627b2d71993-12-24 10:39:16 +000017535
Matthias Kloseb9621712010-04-24 17:59:49 +000017536as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017537_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017538ac_clean_files=$ac_clean_files_save
17539
Matthias Kloseb9621712010-04-24 17:59:49 +000017540test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017541 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017542
Martin v. Löwis11437992002-04-12 09:54:03 +000017543
17544# configure is writing to config.log, and then calls config.status.
17545# config.status does its own redirection, appending to config.log.
17546# Unfortunately, on DOS this fails, as config.log is still kept open
17547# by configure, so config.status won't be able to write to it; its
17548# output is simply discarded. So we exec the FD to /dev/null,
17549# effectively closing config.log, so it can be properly (re)opened and
17550# appended to by config.status. When coming back to configure, we
17551# need to make the FD available again.
17552if test "$no_create" != yes; then
17553 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017554 ac_config_status_args=
17555 test "$silent" = yes &&
17556 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017558 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 exec 5>>config.log
17560 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17561 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017562 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017563fi
17564if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17566$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017567fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017568
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017569
Christian Heimes75ed8902013-11-20 01:11:18 +010017570echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017571if test ! -f Modules/Setup
17572then
17573 cp $srcdir/Modules/Setup.dist Modules/Setup
17574fi
17575
Christian Heimes75ed8902013-11-20 01:11:18 +010017576echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017577if test ! -f Modules/Setup.local
17578then
17579 echo "# Edit this file for local setup changes" >Modules/Setup.local
17580fi
17581
Christian Heimes75ed8902013-11-20 01:11:18 +010017582echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017583$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17584 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017585 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017586mv config.c Modules