blob: b4e82c0a3257fee0493c1576b16725d824e6a3ed [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
778localstatedir
779sharedstatedir
780sysconfdir
781datadir
782datarootdir
783libexecdir
784sbindir
785bindir
786program_transform_name
787prefix
788exec_prefix
789PACKAGE_URL
790PACKAGE_BUGREPORT
791PACKAGE_STRING
792PACKAGE_VERSION
793PACKAGE_TARNAME
794PACKAGE_NAME
795PATH_SEPARATOR
796SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000797ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000798ac_user_opts='
799enable_option_checking
800enable_universalsdk
801with_universal_archs
802with_framework_name
803enable_framework
804with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600805with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_cxx_main
807with_suffix
808enable_shared
809enable_profiling
810with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700811with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100812with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100813with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_libs
815with_system_expat
816with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100817with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000818enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700819with_tcltk_includes
820with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_dbmliborder
822with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_threads
824with_thread
825enable_ipv6
826with_doc_strings
827with_tsc
828with_pymalloc
829with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_fpectl
831with_libm
832with_libc
833enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800835with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000836'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 ac_precious_vars='build_alias
838host_alias
839target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100840MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841CC
842CFLAGS
843LDFLAGS
844LIBS
845CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100846CPP
847PKG_CONFIG
848PKG_CONFIG_PATH
849PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850
Guido van Rossum627b2d71993-12-24 10:39:16 +0000851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000853ac_init_help=
854ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000855ac_unrecognized_opts=
856ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# The variables have the same names as the options, with
858# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862no_recursion=
863prefix=NONE
864program_prefix=NONE
865program_suffix=NONE
866program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871x_includes=NONE
872x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000873
874# Installation directory options.
875# These are left unexpanded so users can "make install exec_prefix=/foo"
876# and all the variables that are supposed to be based on exec_prefix
877# by default will actually change.
878# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880bindir='${exec_prefix}/bin'
881sbindir='${exec_prefix}/sbin'
882libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883datarootdir='${prefix}/share'
884datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885sysconfdir='${prefix}/etc'
886sharedstatedir='${prefix}/com'
887localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888includedir='${prefix}/include'
889oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
891infodir='${datarootdir}/info'
892htmldir='${docdir}'
893dvidir='${docdir}'
894pdfdir='${docdir}'
895psdir='${docdir}'
896libdir='${exec_prefix}/lib'
897localedir='${datarootdir}/locale'
898mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000903do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904 # If the previous option needs an argument, assign it.
905 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 ac_prev=
908 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200912 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
913 *=) ac_optarg= ;;
914 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 # Accept the important Cygnus configure options, so we can diagnose typos.
918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 case $ac_dashdash$ac_option in
920 --)
921 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923 -bindir | --bindir | --bindi | --bind | --bin | --bi)
924 ac_prev=bindir ;;
925 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933 -cache-file | --cache-file | --cache-fil | --cache-fi \
934 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
935 ac_prev=cache_file ;;
936 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
937 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 cache_file=$ac_optarg ;;
939
940 --config-cache | -C)
941 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
949 | --dataroo | --dataro | --datar)
950 ac_prev=datarootdir ;;
951 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
952 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
953 datarootdir=$ac_optarg ;;
954
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000956 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200959 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt_orig=$ac_useropt
961 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
962 case $ac_user_opts in
963 *"
964"enable_$ac_useropt"
965"*) ;;
966 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
967 ac_unrecognized_sep=', ';;
968 esac
969 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970
971 -docdir | --docdir | --docdi | --doc | --do)
972 ac_prev=docdir ;;
973 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
974 docdir=$ac_optarg ;;
975
976 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
977 ac_prev=dvidir ;;
978 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
979 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000982 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200985 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt_orig=$ac_useropt
987 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988 case $ac_user_opts in
989 *"
990"enable_$ac_useropt"
991"*) ;;
992 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
993 ac_unrecognized_sep=', ';;
994 esac
995 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
998 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
999 | --exec | --exe | --ex)
1000 ac_prev=exec_prefix ;;
1001 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1002 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1003 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 # Obsolete; use --with-gas.
1008 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 -help | --help | --hel | --he | -h)
1011 ac_init_help=long ;;
1012 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1013 ac_init_help=recursive ;;
1014 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1015 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001022 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1023 ac_prev=htmldir ;;
1024 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1025 | --ht=*)
1026 htmldir=$ac_optarg ;;
1027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -includedir | --includedir | --includedi | --included | --include \
1029 | --includ | --inclu | --incl | --inc)
1030 ac_prev=includedir ;;
1031 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1032 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -infodir | --infodir | --infodi | --infod | --info | --inf)
1036 ac_prev=infodir ;;
1037 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -libdir | --libdir | --libdi | --libd)
1041 ac_prev=libdir ;;
1042 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1046 | --libexe | --libex | --libe)
1047 ac_prev=libexecdir ;;
1048 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1049 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 -localedir | --localedir | --localedi | --localed | --locale)
1053 ac_prev=localedir ;;
1054 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1055 localedir=$ac_optarg ;;
1056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 ac_prev=localstatedir ;;
1060 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1065 ac_prev=mandir ;;
1066 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Obsolete; use --without-fp.
1071 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 no_create=yes ;;
1076
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1078 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1079 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1082 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1083 | --oldin | --oldi | --old | --ol | --o)
1084 ac_prev=oldincludedir ;;
1085 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1086 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1087 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1091 ac_prev=prefix ;;
1092 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1096 | --program-pre | --program-pr | --program-p)
1097 ac_prev=program_prefix ;;
1098 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1099 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1103 | --program-suf | --program-su | --program-s)
1104 ac_prev=program_suffix ;;
1105 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1106 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-transform-name | --program-transform-name \
1110 | --program-transform-nam | --program-transform-na \
1111 | --program-transform-n | --program-transform- \
1112 | --program-transform | --program-transfor \
1113 | --program-transfo | --program-transf \
1114 | --program-trans | --program-tran \
1115 | --progr-tra | --program-tr | --program-t)
1116 ac_prev=program_transform_name ;;
1117 -program-transform-name=* | --program-transform-name=* \
1118 | --program-transform-nam=* | --program-transform-na=* \
1119 | --program-transform-n=* | --program-transform-=* \
1120 | --program-transform=* | --program-transfor=* \
1121 | --program-transfo=* | --program-transf=* \
1122 | --program-trans=* | --program-tran=* \
1123 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001126 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1127 ac_prev=pdfdir ;;
1128 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1129 pdfdir=$ac_optarg ;;
1130
1131 -psdir | --psdir | --psdi | --psd | --ps)
1132 ac_prev=psdir ;;
1133 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1134 psdir=$ac_optarg ;;
1135
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1137 | -silent | --silent | --silen | --sile | --sil)
1138 silent=yes ;;
1139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1141 ac_prev=sbindir ;;
1142 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1143 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
1146 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1147 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1148 | --sharedst | --shareds | --shared | --share | --shar \
1149 | --sha | --sh)
1150 ac_prev=sharedstatedir ;;
1151 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1152 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1153 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1154 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 -site | --site | --sit)
1158 ac_prev=site ;;
1159 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1163 ac_prev=srcdir ;;
1164 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1168 | --syscon | --sysco | --sysc | --sys | --sy)
1169 ac_prev=sysconfdir ;;
1170 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1171 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
1179 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1180 verbose=yes ;;
1181
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 -version | --version | --versio | --versi | --vers | -V)
1183 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001189 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 --x)
1218 # Obsolete; use --with-x.
1219 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1222 | --x-incl | --x-inc | --x-in | --x-i)
1223 ac_prev=x_includes ;;
1224 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1225 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1229 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1230 ac_prev=x_libraries ;;
1231 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1232 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1236Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 ;;
1238
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 *=*)
1240 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1241 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 case $ac_envvar in #(
1243 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 export $ac_envvar ;;
1248
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001249 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001254 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ;;
1256
1257 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258done
1259
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263fi
1264
Matthias Kloseb9621712010-04-24 17:59:49 +00001265if test -n "$ac_unrecognized_opts"; then
1266 case $enable_option_checking in
1267 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1270 esac
1271fi
1272
1273# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1275 datadir sysconfdir sharedstatedir localstatedir includedir \
1276 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Ned Deily8482ce42016-09-06 15:09:20 -07001277 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 # Remove trailing slashes.
1281 case $ac_val in
1282 */ )
1283 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1284 eval $ac_var=\$ac_val;;
1285 esac
1286 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 [\\/$]* | ?:[\\/]* ) continue;;
1289 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001291 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001292done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
Martin v. Löwis11437992002-04-12 09:54:03 +00001294# There might be people who depend on the old broken behavior: `$host'
1295# used to hold the argument of --host etc.
1296# FIXME: To remove some day.
1297build=$build_alias
1298host=$host_alias
1299target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# FIXME: To remove some day.
1302if test "x$host_alias" != x; then
1303 if test "x$build_alias" = x; then
1304 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 elif test "x$build_alias" != "x$host_alias"; then
1306 cross_compiling=yes
1307 fi
1308fi
1309
1310ac_tool_prefix=
1311test -n "$host_alias" && ac_tool_prefix=$host_alias-
1312
1313test "$silent" = yes && exec 6>/dev/null
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316ac_pwd=`pwd` && test -n "$ac_pwd" &&
1317ac_ls_di=`ls -di .` &&
1318ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001319 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324# Find the source files, if location was not specified.
1325if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001328 ac_confdir=`$as_dirname -- "$as_myself" ||
1329$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1330 X"$as_myself" : 'X\(//\)[^/]' \| \
1331 X"$as_myself" : 'X\(//\)$' \| \
1332 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1333$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\/\)[^/].*/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\/\)$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\).*/{
1347 s//\1/
1348 q
1349 }
1350 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353 srcdir=..
1354 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355else
1356 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001358if test ! -r "$srcdir/$ac_unique_file"; then
1359 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001360 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1363ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001364 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 pwd)`
1366# When building in place, set srcdir=.
1367if test "$ac_abs_confdir" = "$ac_pwd"; then
1368 srcdir=.
1369fi
1370# Remove unnecessary trailing slashes from srcdir.
1371# Double slashes in file names in object file debugging info
1372# mess up M-x gdb in Emacs.
1373case $srcdir in
1374*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1375esac
1376for ac_var in $ac_precious_vars; do
1377 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1378 eval ac_env_${ac_var}_value=\$${ac_var}
1379 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1380 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1381done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001382
Martin v. Löwis11437992002-04-12 09:54:03 +00001383#
1384# Report the --help message.
1385#
1386if test "$ac_init_help" = "long"; then
1387 # Omit some internal or obsolete options to make the list less imposing.
1388 # This message is too long to be a string in the A/UX 3.1 sh.
1389 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001390\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
1392Usage: $0 [OPTION]... [VAR=VALUE]...
1393
1394To assign environment variables (e.g., CC, CFLAGS...), specify them as
1395VAR=VALUE. See below for descriptions of some of the useful variables.
1396
1397Defaults for the options are specified in brackets.
1398
1399Configuration:
1400 -h, --help display this help and exit
1401 --help=short display options specific to this package
1402 --help=recursive display the short help of all the included packages
1403 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001404 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 --cache-file=FILE cache test results in FILE [disabled]
1406 -C, --config-cache alias for \`--cache-file=config.cache'
1407 -n, --no-create do not create output files
1408 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1409
Martin v. Löwis11437992002-04-12 09:54:03 +00001410Installation directories:
1411 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001412 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001414 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001415
1416By default, \`make install' will install all the files in
1417\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1418an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1419for instance \`--prefix=\$HOME'.
1420
1421For better control, use the options below.
1422
1423Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 --bindir=DIR user executables [EPREFIX/bin]
1425 --sbindir=DIR system admin executables [EPREFIX/sbin]
1426 --libexecdir=DIR program executables [EPREFIX/libexec]
1427 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1428 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1429 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1430 --libdir=DIR object code libraries [EPREFIX/lib]
1431 --includedir=DIR C header files [PREFIX/include]
1432 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1433 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1434 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1435 --infodir=DIR info documentation [DATAROOTDIR/info]
1436 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1437 --mandir=DIR man documentation [DATAROOTDIR/man]
1438 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1439 --htmldir=DIR html documentation [DOCDIR]
1440 --dvidir=DIR dvi documentation [DOCDIR]
1441 --pdfdir=DIR pdf documentation [DOCDIR]
1442 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443_ACEOF
1444
1445 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001446
1447System types:
1448 --build=BUILD configure for building on BUILD [guessed]
1449 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
1451fi
1452
1453if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001454 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001455 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001456 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 cat <<\_ACEOF
1458
1459Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1462 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001463 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001464 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --enable-framework[=INSTALLDIR]
1466 Build (MacOSX|Darwin) framework
1467 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001468 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001469 --enable-loadable-sqlite-extensions
1470 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --enable-ipv6 Enable ipv6 (with ipv4) support
1472 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001473 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476Optional Packages:
1477 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1478 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001479 --with-universal-archs=ARCH
1480 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001481 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001482 --with-framework-name=FRAMEWORK
1483 specify an alternate name of the framework built
1484 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001486 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001487 --with-cxx-main=<compiler>
1488 compile main() and link python executable with C++
1489 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with-suffix=.exe set executable suffix
1491 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001492 --with-lto Enable Link Time Optimization in PGO builds.
1493 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001494 --with-hash-algorithm=[fnv|siphash24]
1495 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001496 --with-address-sanitizer
1497 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001499 --with-system-expat build pyexpat module using an installed expat
1500 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001502 --with-system-libmpdec build _decimal module using an installed libmpdec
1503 library
Ned Deilyd819b932013-09-06 01:07:05 -07001504 --with-tcltk-includes='-I...'
1505 override search for Tcl and Tk include files
1506 --with-tcltk-libs='-L...'
1507 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001508 --with-dbmliborder=db1:db2:...
1509 order to check db backends for dbm. Valid value is a
1510 colon separated string with the backend names
1511 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with(out)-threads[=DIRECTORY]
1514 disable/enable thread support
1515 --with(out)-thread[=DIRECTORY]
1516 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001518 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001520 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-fpectl enable SIGFPE catching
1522 --with-libm=STRING math library
1523 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001524 --with(out)-computed-gotos
1525 Use computed gotos in evaluation loop (enabled by
1526 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001527 --with(out)-ensurepip=[=upgrade]
1528 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
1530Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001531 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 CC C compiler command
1533 CFLAGS C compiler flags
1534 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1535 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001540 PKG_CONFIG path to pkg-config utility
1541 PKG_CONFIG_PATH
1542 directories to add to pkg-config's search path
1543 PKG_CONFIG_LIBDIR
1544 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
1546Use these variables to override the choices made by `configure' or to help
1547it to find libraries and programs with nonstandard names/locations.
1548
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001549Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001552fi
1553
1554if test "$ac_init_help" = "recursive"; then
1555 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001557 test -d "$ac_dir" ||
1558 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1559 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_builddir=.
1561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562case "$ac_dir" in
1563.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001565 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001567 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 case $ac_top_builddir_sub in
1569 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1571 esac ;;
1572esac
1573ac_abs_top_builddir=$ac_pwd
1574ac_abs_builddir=$ac_pwd$ac_dir_suffix
1575# for backward compatibility:
1576ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
1578case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 ac_top_srcdir=$ac_top_builddir_sub
1582 ac_abs_top_srcdir=$ac_pwd ;;
1583 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 ac_top_srcdir=$srcdir
1586 ac_abs_top_srcdir=$srcdir ;;
1587 *) # Relative name.
1588 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1589 ac_top_srcdir=$ac_top_build_prefix$srcdir
1590 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001591esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 cd "$ac_dir" || { ac_status=$?; continue; }
1595 # Check for guested configure.
1596 if test -f "$ac_srcdir/configure.gnu"; then
1597 echo &&
1598 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1599 elif test -f "$ac_srcdir/configure"; then
1600 echo &&
1601 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001603 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 fi || ac_status=$?
1605 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 done
1607fi
1608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001610if $ac_init_version; then
1611 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001612python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001613generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001614
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001615Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001616This configure script is free software; the Free Software Foundation
1617gives unlimited permission to copy, distribute and modify it.
1618_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001621
1622## ------------------------ ##
1623## Autoconf initialization. ##
1624## ------------------------ ##
1625
1626# ac_fn_c_try_compile LINENO
1627# --------------------------
1628# Try to compile conftest.$ac_ext, and return whether this succeeded.
1629ac_fn_c_try_compile ()
1630{
1631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1632 rm -f conftest.$ac_objext
1633 if { { ac_try="$ac_compile"
1634case "(($ac_try" in
1635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1636 *) ac_try_echo=$ac_try;;
1637esac
1638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1639$as_echo "$ac_try_echo"; } >&5
1640 (eval "$ac_compile") 2>conftest.err
1641 ac_status=$?
1642 if test -s conftest.err; then
1643 grep -v '^ *+' conftest.err >conftest.er1
1644 cat conftest.er1 >&5
1645 mv -f conftest.er1 conftest.err
1646 fi
1647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1648 test $ac_status = 0; } && {
1649 test -z "$ac_c_werror_flag" ||
1650 test ! -s conftest.err
1651 } && test -s conftest.$ac_objext; then :
1652 ac_retval=0
1653else
1654 $as_echo "$as_me: failed program was:" >&5
1655sed 's/^/| /' conftest.$ac_ext >&5
1656
1657 ac_retval=1
1658fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001659 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 as_fn_set_status $ac_retval
1661
1662} # ac_fn_c_try_compile
1663
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001664# ac_fn_c_try_cpp LINENO
1665# ----------------------
1666# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1667ac_fn_c_try_cpp ()
1668{
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 if { { ac_try="$ac_cpp conftest.$ac_ext"
1671case "(($ac_try" in
1672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673 *) ac_try_echo=$ac_try;;
1674esac
1675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676$as_echo "$ac_try_echo"; } >&5
1677 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1678 ac_status=$?
1679 if test -s conftest.err; then
1680 grep -v '^ *+' conftest.err >conftest.er1
1681 cat conftest.er1 >&5
1682 mv -f conftest.er1 conftest.err
1683 fi
1684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1685 test $ac_status = 0; } > conftest.i && {
1686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1687 test ! -s conftest.err
1688 }; then :
1689 ac_retval=0
1690else
1691 $as_echo "$as_me: failed program was:" >&5
1692sed 's/^/| /' conftest.$ac_ext >&5
1693
1694 ac_retval=1
1695fi
1696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1697 as_fn_set_status $ac_retval
1698
1699} # ac_fn_c_try_cpp
1700
Matthias Kloseb9621712010-04-24 17:59:49 +00001701# ac_fn_c_try_link LINENO
1702# -----------------------
1703# Try to link conftest.$ac_ext, and return whether this succeeded.
1704ac_fn_c_try_link ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1707 rm -f conftest.$ac_objext conftest$ac_exeext
1708 if { { ac_try="$ac_link"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_link") 2>conftest.err
1716 ac_status=$?
1717 if test -s conftest.err; then
1718 grep -v '^ *+' conftest.err >conftest.er1
1719 cat conftest.er1 >&5
1720 mv -f conftest.er1 conftest.err
1721 fi
1722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1723 test $ac_status = 0; } && {
1724 test -z "$ac_c_werror_flag" ||
1725 test ! -s conftest.err
1726 } && test -s conftest$ac_exeext && {
1727 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001728 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 }; then :
1730 ac_retval=0
1731else
1732 $as_echo "$as_me: failed program was:" >&5
1733sed 's/^/| /' conftest.$ac_ext >&5
1734
1735 ac_retval=1
1736fi
1737 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1738 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1739 # interfere with the next link command; also delete a directory that is
1740 # left behind by Apple's compiler. We do this before executing the actions.
1741 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 as_fn_set_status $ac_retval
1744
1745} # ac_fn_c_try_link
1746
Matthias Kloseb9621712010-04-24 17:59:49 +00001747# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1748# -------------------------------------------------------
1749# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1750# the include files in INCLUDES and setting the cache variable VAR
1751# accordingly.
1752ac_fn_c_check_header_mongrel ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001755 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1757$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001758if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001759 $as_echo_n "(cached) " >&6
1760fi
1761eval ac_res=\$$3
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1763$as_echo "$ac_res" >&6; }
1764else
1765 # Is the header compilable?
1766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1767$as_echo_n "checking $2 usability... " >&6; }
1768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1769/* end confdefs.h. */
1770$4
1771#include <$2>
1772_ACEOF
1773if ac_fn_c_try_compile "$LINENO"; then :
1774 ac_header_compiler=yes
1775else
1776 ac_header_compiler=no
1777fi
1778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1780$as_echo "$ac_header_compiler" >&6; }
1781
1782# Is the header present?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1784$as_echo_n "checking $2 presence... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787#include <$2>
1788_ACEOF
1789if ac_fn_c_try_cpp "$LINENO"; then :
1790 ac_header_preproc=yes
1791else
1792 ac_header_preproc=no
1793fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001794rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1796$as_echo "$ac_header_preproc" >&6; }
1797
1798# So? What about this header?
1799case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1800 yes:no: )
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1802$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1804$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1805 ;;
1806 no:yes:* )
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1808$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1810$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1812$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1814$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&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;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001817( $as_echo "## --------------------------------------- ##
1818## Report this to https://bugs.python.org/ ##
1819## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 ) | sed "s/^/$as_me: WARNING: /" >&2
1821 ;;
1822esac
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001825if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 $as_echo_n "(cached) " >&6
1827else
1828 eval "$3=\$ac_header_compiler"
1829fi
1830eval ac_res=\$$3
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832$as_echo "$ac_res" >&6; }
1833fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001834 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001835
1836} # ac_fn_c_check_header_mongrel
1837
1838# ac_fn_c_try_run LINENO
1839# ----------------------
1840# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1841# that executables *can* be run.
1842ac_fn_c_try_run ()
1843{
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 if { { ac_try="$ac_link"
1846case "(($ac_try" in
1847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1848 *) ac_try_echo=$ac_try;;
1849esac
1850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1851$as_echo "$ac_try_echo"; } >&5
1852 (eval "$ac_link") 2>&5
1853 ac_status=$?
1854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1855 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1856 { { case "(($ac_try" in
1857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1858 *) ac_try_echo=$ac_try;;
1859esac
1860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1861$as_echo "$ac_try_echo"; } >&5
1862 (eval "$ac_try") 2>&5
1863 ac_status=$?
1864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1865 test $ac_status = 0; }; }; then :
1866 ac_retval=0
1867else
1868 $as_echo "$as_me: program exited with status $ac_status" >&5
1869 $as_echo "$as_me: failed program was:" >&5
1870sed 's/^/| /' conftest.$ac_ext >&5
1871
1872 ac_retval=$ac_status
1873fi
1874 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 as_fn_set_status $ac_retval
1877
1878} # ac_fn_c_try_run
1879
1880# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1881# -------------------------------------------------------
1882# Tests whether HEADER exists and can be compiled using the include files in
1883# INCLUDES, setting the cache variable VAR accordingly.
1884ac_fn_c_check_header_compile ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001889if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 $as_echo_n "(cached) " >&6
1891else
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$4
1895#include <$2>
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 eval "$3=yes"
1899else
1900 eval "$3=no"
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001908
1909} # ac_fn_c_check_header_compile
1910
Matthias Kloseb9621712010-04-24 17:59:49 +00001911# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1912# -------------------------------------------
1913# Tests whether TYPE exists after having included INCLUDES, setting cache
1914# variable VAR accordingly.
1915ac_fn_c_check_type ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001920if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930if (sizeof ($2))
1931 return 0;
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$4
1940int
1941main ()
1942{
1943if (sizeof (($2)))
1944 return 0;
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950
1951else
1952 eval "$3=yes"
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955fi
1956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1957fi
1958eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001962
1963} # ac_fn_c_check_type
1964
Matthias Kloseb9621712010-04-24 17:59:49 +00001965# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1966# --------------------------------------------
1967# Tries to find the compile-time value of EXPR in a program that includes
1968# INCLUDES, setting VAR accordingly. Returns whether the value could be
1969# computed
1970ac_fn_c_compute_int ()
1971{
1972 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973 if test "$cross_compiling" = yes; then
1974 # Depending upon the size, compute the lo and hi bounds.
1975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1976/* end confdefs.h. */
1977$4
1978int
1979main ()
1980{
1981static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001982test_array [0] = 0;
1983return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985 ;
1986 return 0;
1987}
1988_ACEOF
1989if ac_fn_c_try_compile "$LINENO"; then :
1990 ac_lo=0 ac_mid=0
1991 while :; do
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001999test_array [0] = 0;
2000return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_hi=$ac_mid; break
2008else
2009 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2010 if test $ac_lo -le $ac_mid; then
2011 ac_lo= ac_hi=
2012 break
2013 fi
2014 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2017 done
2018else
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002026test_array [0] = 0;
2027return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 ac_hi=-1 ac_mid=-1
2035 while :; do
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$4
2039int
2040main ()
2041{
2042static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_lo=$ac_mid; break
2052else
2053 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2054 if test $ac_mid -le $ac_hi; then
2055 ac_lo= ac_hi=
2056 break
2057 fi
2058 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2059fi
2060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2061 done
2062else
2063 ac_lo= ac_hi=
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2068# Binary search between lo and hi bounds.
2069while test "x$ac_lo" != "x$ac_hi"; do
2070 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002078test_array [0] = 0;
2079return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_hi=$ac_mid
2087else
2088 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091done
2092case $ac_lo in #((
2093?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2094'') ac_retval=1 ;;
2095esac
2096 else
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100static long int longval () { return $2; }
2101static unsigned long int ulongval () { return $2; }
2102#include <stdio.h>
2103#include <stdlib.h>
2104int
2105main ()
2106{
2107
2108 FILE *f = fopen ("conftest.val", "w");
2109 if (! f)
2110 return 1;
2111 if (($2) < 0)
2112 {
2113 long int i = longval ();
2114 if (i != ($2))
2115 return 1;
2116 fprintf (f, "%ld", i);
2117 }
2118 else
2119 {
2120 unsigned long int i = ulongval ();
2121 if (i != ($2))
2122 return 1;
2123 fprintf (f, "%lu", i);
2124 }
2125 /* Do not output a trailing newline, as this causes \r\n confusion
2126 on some platforms. */
2127 return ferror (f) || fclose (f) != 0;
2128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_run "$LINENO"; then :
2134 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2135else
2136 ac_retval=1
2137fi
2138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2139 conftest.$ac_objext conftest.beam conftest.$ac_ext
2140rm -f conftest.val
2141
2142 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002143 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002144 as_fn_set_status $ac_retval
2145
2146} # ac_fn_c_compute_int
2147
2148# ac_fn_c_check_func LINENO FUNC VAR
2149# ----------------------------------
2150# Tests whether FUNC exists, setting the cache variable VAR accordingly
2151ac_fn_c_check_func ()
2152{
2153 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2155$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002156if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002157 $as_echo_n "(cached) " >&6
2158else
2159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h. */
2161/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2162 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2163#define $2 innocuous_$2
2164
2165/* System header to define __stub macros and hopefully few prototypes,
2166 which can conflict with char $2 (); below.
2167 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2168 <limits.h> exists even on freestanding compilers. */
2169
2170#ifdef __STDC__
2171# include <limits.h>
2172#else
2173# include <assert.h>
2174#endif
2175
2176#undef $2
2177
2178/* Override any GCC internal prototype to avoid an error.
2179 Use char because int might match the return type of a GCC
2180 builtin and then its argument prototype would still apply. */
2181#ifdef __cplusplus
2182extern "C"
2183#endif
2184char $2 ();
2185/* The GNU C library defines this for functions which it implements
2186 to always fail with ENOSYS. Some functions are actually named
2187 something starting with __ and the normal name is an alias. */
2188#if defined __stub_$2 || defined __stub___$2
2189choke me
2190#endif
2191
2192int
2193main ()
2194{
2195return $2 ();
2196 ;
2197 return 0;
2198}
2199_ACEOF
2200if ac_fn_c_try_link "$LINENO"; then :
2201 eval "$3=yes"
2202else
2203 eval "$3=no"
2204fi
2205rm -f core conftest.err conftest.$ac_objext \
2206 conftest$ac_exeext conftest.$ac_ext
2207fi
2208eval ac_res=\$$3
2209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2210$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002211 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002212
2213} # ac_fn_c_check_func
2214
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002215# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2216# ---------------------------------------------
2217# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2218# accordingly.
2219ac_fn_c_check_decl ()
2220{
2221 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2222 as_decl_name=`echo $2|sed 's/ *(.*//'`
2223 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2225$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2226if eval \${$3+:} false; then :
2227 $as_echo_n "(cached) " >&6
2228else
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230/* end confdefs.h. */
2231$4
2232int
2233main ()
2234{
2235#ifndef $as_decl_name
2236#ifdef __cplusplus
2237 (void) $as_decl_use;
2238#else
2239 (void) $as_decl_name;
2240#endif
2241#endif
2242
2243 ;
2244 return 0;
2245}
2246_ACEOF
2247if ac_fn_c_try_compile "$LINENO"; then :
2248 eval "$3=yes"
2249else
2250 eval "$3=no"
2251fi
2252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2253fi
2254eval ac_res=\$$3
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2256$as_echo "$ac_res" >&6; }
2257 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2258
2259} # ac_fn_c_check_decl
2260
Matthias Kloseb9621712010-04-24 17:59:49 +00002261# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2262# ----------------------------------------------------
2263# Tries to find if the field MEMBER exists in type AGGR, after including
2264# INCLUDES, setting cache variable VAR accordingly.
2265ac_fn_c_check_member ()
2266{
2267 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2269$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002270if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002271 $as_echo_n "(cached) " >&6
2272else
2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h. */
2275$5
2276int
2277main ()
2278{
2279static $2 ac_aggr;
2280if (ac_aggr.$3)
2281return 0;
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
2287 eval "$4=yes"
2288else
2289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290/* end confdefs.h. */
2291$5
2292int
2293main ()
2294{
2295static $2 ac_aggr;
2296if (sizeof ac_aggr.$3)
2297return 0;
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302if ac_fn_c_try_compile "$LINENO"; then :
2303 eval "$4=yes"
2304else
2305 eval "$4=no"
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308fi
2309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310fi
2311eval ac_res=\$$4
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2313$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002314 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002315
2316} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002317cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002318This file contains any messages produced by compilers while
2319running configure, to aid debugging if configure makes a mistake.
2320
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002321It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002322generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002323
2324 $ $0 $@
2325
2326_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002327exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002328{
2329cat <<_ASUNAME
2330## --------- ##
2331## Platform. ##
2332## --------- ##
2333
2334hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2335uname -m = `(uname -m) 2>/dev/null || echo unknown`
2336uname -r = `(uname -r) 2>/dev/null || echo unknown`
2337uname -s = `(uname -s) 2>/dev/null || echo unknown`
2338uname -v = `(uname -v) 2>/dev/null || echo unknown`
2339
2340/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2341/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2342
2343/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2344/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2345/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002347/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2348/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2349/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2350
2351_ASUNAME
2352
2353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2354for as_dir in $PATH
2355do
2356 IFS=$as_save_IFS
2357 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002358 $as_echo "PATH: $as_dir"
2359 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002360IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002361
2362} >&5
2363
2364cat >&5 <<_ACEOF
2365
2366
2367## ----------- ##
2368## Core tests. ##
2369## ----------- ##
2370
2371_ACEOF
2372
2373
2374# Keep a trace of the command line.
2375# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002376# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002377# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002378# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002379ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002380ac_configure_args0=
2381ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002382ac_must_keep_next=false
2383for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002384do
Skip Montanaro6dead952003-09-25 14:50:04 +00002385 for ac_arg
2386 do
2387 case $ac_arg in
2388 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2389 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2390 | -silent | --silent | --silen | --sile | --sil)
2391 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002392 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002393 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002394 esac
2395 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002396 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002398 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002399 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002400 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002402 case $ac_arg in
2403 *=* | --config-cache | -C | -disable-* | --disable-* \
2404 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2405 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2406 | -with-* | --with-* | -without-* | --without-* | --x)
2407 case "$ac_configure_args0 " in
2408 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2409 esac
2410 ;;
2411 -* ) ac_must_keep_next=true ;;
2412 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 ;;
2416 esac
2417 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002418done
Matthias Kloseb9621712010-04-24 17:59:49 +00002419{ ac_configure_args0=; unset ac_configure_args0;}
2420{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002421
2422# When interrupted or exit'd, cleanup temporary files, and complete
2423# config.log. We remove comments because anyway the quotes in there
2424# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425# WARNING: Use '\'' to represent an apostrophe within the trap.
2426# 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 +00002427trap 'exit_status=$?
2428 # Save into config.log some information that might help in debugging.
2429 {
2430 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002431
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002432 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002433## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002434## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 echo
2436 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437(
2438 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2439 eval ac_val=\$$ac_var
2440 case $ac_val in #(
2441 *${as_nl}*)
2442 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002443 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2444$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445 esac
2446 case $ac_var in #(
2447 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2449 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450 esac ;;
2451 esac
2452 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2455 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 "s/'\''/'\''\\\\'\'''\''/g;
2458 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2459 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002460 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002462 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac |
2464 sort
2465)
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002467
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002468 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002469## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002470## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002471 echo
2472 for ac_var in $ac_subst_vars
2473 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 eval ac_val=\$$ac_var
2475 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 done | sort
2480 echo
2481
2482 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002483 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 echo
2487 for ac_var in $ac_subst_files
2488 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 eval ac_val=\$$ac_var
2490 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 done | sort
2495 echo
2496 fi
2497
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002500## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 echo
2505 fi
2506 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 $as_echo "$as_me: caught signal $ac_signal"
2508 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 rm -f core *.core core.conftest.* &&
2511 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002514for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002516done
2517ac_signal=0
2518
2519# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521
Matthias Kloseb9621712010-04-24 17:59:49 +00002522$as_echo "/* confdefs.h */" > confdefs.h
2523
Martin v. Löwis11437992002-04-12 09:54:03 +00002524# Predefined preprocessor variables.
2525
2526cat >>confdefs.h <<_ACEOF
2527#define PACKAGE_NAME "$PACKAGE_NAME"
2528_ACEOF
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530cat >>confdefs.h <<_ACEOF
2531#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2532_ACEOF
2533
Martin v. Löwis11437992002-04-12 09:54:03 +00002534cat >>confdefs.h <<_ACEOF
2535#define PACKAGE_VERSION "$PACKAGE_VERSION"
2536_ACEOF
2537
Martin v. Löwis11437992002-04-12 09:54:03 +00002538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_STRING "$PACKAGE_STRING"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2544_ACEOF
2545
Matthias Kloseb9621712010-04-24 17:59:49 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_URL "$PACKAGE_URL"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
2551# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002552# Prefer an explicitly selected file to automatically selected ones.
2553ac_site_file1=NONE
2554ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002556 # We do not want a PATH search for config.site.
2557 case $CONFIG_SITE in #((
2558 -*) ac_site_file1=./$CONFIG_SITE;;
2559 */*) ac_site_file1=$CONFIG_SITE;;
2560 *) ac_site_file1=./$CONFIG_SITE;;
2561 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002563 ac_site_file1=$prefix/share/config.site
2564 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565else
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 ac_site_file1=$ac_default_prefix/share/config.site
2567 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002569for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570do
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 test "x$ac_site_file" = xNONE && continue
2572 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2573 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2574$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 . "$ac_site_file" \
2577 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2579as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002580See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002581 fi
2582done
2583
2584if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 # Some versions of bash will fail to source /dev/null (special files
2586 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2587 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2589$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2592 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 esac
2594 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595else
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2597$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 >$cache_file
2599fi
2600
2601# Check that the precious variables saved in the cache have kept the same
2602# value.
2603ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2606 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2608 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 case $ac_old_set,$ac_new_set in
2610 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2612$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 +00002613 ac_cache_corrupted=: ;;
2614 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2616$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 ac_cache_corrupted=: ;;
2618 ,);;
2619 *)
2620 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 # differences in whitespace do not lead to failure.
2622 ac_old_val_w=`echo x $ac_old_val`
2623 ac_new_val_w=`echo x $ac_new_val`
2624 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2626$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2627 ac_cache_corrupted=:
2628 else
2629 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2630$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2631 eval $ac_var=\$ac_old_val
2632 fi
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2634$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2635 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2636$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 fi;;
2638 esac
2639 # Pass precious variables to config.status.
2640 if test "$ac_new_set" = set; then
2641 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 *) ac_arg=$ac_var=$ac_new_val ;;
2644 esac
2645 case " $ac_configure_args " in
2646 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 esac
2649 fi
2650done
2651if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2655$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002656 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002658## -------------------- ##
2659## Main body of script. ##
2660## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661
Guido van Rossum7f43da71994-08-01 12:15:30 +00002662ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002663ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002664ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2665ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2666ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667
Guido van Rossum627b2d71993-12-24 10:39:16 +00002668
Michael W. Hudson54241132001-12-07 15:38:26 +00002669
Trent Nelson4d4ec652012-10-16 08:51:24 -04002670
Trent Nelson5595ab52012-10-17 04:47:31 -04002671if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002672 # If we're building out-of-tree, we need to make sure the following
2673 # resources get picked up before their $srcdir counterparts.
2674 # Objects/ -> typeslots.inc
2675 # Include/ -> Python-ast.h, graminit.h
2676 # Python/ -> importlib.h
2677 # (A side effect of this is that these resources will automatically be
2678 # regenerated when building out-of-tree, regardless of whether or not
2679 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2680 # off.)
2681 BASECPPFLAGS="-IObjects -IInclude -IPython"
2682else
2683 BASECPPFLAGS=""
2684fi
2685
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002686
2687
2688
2689
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002690if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002691then
2692# Extract the first word of "hg", so it can be a program name with args.
2693set dummy hg; ac_word=$2
2694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002696if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002697 $as_echo_n "(cached) " >&6
2698else
2699 if test -n "$HAS_HG"; then
2700 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2701else
2702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2703for as_dir in $PATH
2704do
2705 IFS=$as_save_IFS
2706 test -z "$as_dir" && as_dir=.
2707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709 ac_cv_prog_HAS_HG="found"
2710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2711 break 2
2712 fi
2713done
2714 done
2715IFS=$as_save_IFS
2716
2717 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2718fi
2719fi
2720HAS_HG=$ac_cv_prog_HAS_HG
2721if test -n "$HAS_HG"; then
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2723$as_echo "$HAS_HG" >&6; }
2724else
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2726$as_echo "no" >&6; }
2727fi
2728
2729
2730else
2731HAS_HG=no-repository
2732fi
2733if test $HAS_HG = found
2734then
2735 HGVERSION="hg id -i \$(srcdir)"
2736 HGTAG="hg id -t \$(srcdir)"
2737 HGBRANCH="hg id -b \$(srcdir)"
2738else
2739 HGVERSION=""
2740 HGTAG=""
2741 HGBRANCH=""
2742fi
2743
2744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002746
2747
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002748ac_aux_dir=
2749for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2750 if test -f "$ac_dir/install-sh"; then
2751 ac_aux_dir=$ac_dir
2752 ac_install_sh="$ac_aux_dir/install-sh -c"
2753 break
2754 elif test -f "$ac_dir/install.sh"; then
2755 ac_aux_dir=$ac_dir
2756 ac_install_sh="$ac_aux_dir/install.sh -c"
2757 break
2758 elif test -f "$ac_dir/shtool"; then
2759 ac_aux_dir=$ac_dir
2760 ac_install_sh="$ac_aux_dir/shtool install -c"
2761 break
2762 fi
2763done
2764if test -z "$ac_aux_dir"; then
2765 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2766fi
2767
2768# These three variables are undocumented and unsupported,
2769# and are intended to be withdrawn in a future Autoconf release.
2770# They can cause serious problems if a builder's source tree is in a directory
2771# whose full name contains unusual characters.
2772ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2773ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2774ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2775
2776
2777# Make sure we can run config.sub.
2778$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2779 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2780
2781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2782$as_echo_n "checking build system type... " >&6; }
2783if ${ac_cv_build+:} false; then :
2784 $as_echo_n "(cached) " >&6
2785else
2786 ac_build_alias=$build_alias
2787test "x$ac_build_alias" = x &&
2788 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2789test "x$ac_build_alias" = x &&
2790 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2791ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2792 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2793
2794fi
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2796$as_echo "$ac_cv_build" >&6; }
2797case $ac_cv_build in
2798*-*-*) ;;
2799*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2800esac
2801build=$ac_cv_build
2802ac_save_IFS=$IFS; IFS='-'
2803set x $ac_cv_build
2804shift
2805build_cpu=$1
2806build_vendor=$2
2807shift; shift
2808# Remember, the first character of IFS is used to create $*,
2809# except with old shells:
2810build_os=$*
2811IFS=$ac_save_IFS
2812case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2813
2814
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2816$as_echo_n "checking host system type... " >&6; }
2817if ${ac_cv_host+:} false; then :
2818 $as_echo_n "(cached) " >&6
2819else
2820 if test "x$host_alias" = x; then
2821 ac_cv_host=$ac_cv_build
2822else
2823 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2824 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2825fi
2826
2827fi
2828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2829$as_echo "$ac_cv_host" >&6; }
2830case $ac_cv_host in
2831*-*-*) ;;
2832*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2833esac
2834host=$ac_cv_host
2835ac_save_IFS=$IFS; IFS='-'
2836set x $ac_cv_host
2837shift
2838host_cpu=$1
2839host_vendor=$2
2840shift; shift
2841# Remember, the first character of IFS is used to create $*,
2842# except with old shells:
2843host_os=$*
2844IFS=$ac_save_IFS
2845case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2846
2847
2848
doko@python.orga10e4a92013-01-25 18:45:12 +01002849
2850
Ned Deilyfcbc2462014-08-22 13:32:49 -07002851# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2852rm -f pybuilddir.txt
2853
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002854for ac_prog in python$PACKAGE_VERSION python3 python
2855do
2856 # Extract the first word of "$ac_prog", so it can be a program name with args.
2857set dummy $ac_prog; ac_word=$2
2858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2859$as_echo_n "checking for $ac_word... " >&6; }
2860if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2861 $as_echo_n "(cached) " >&6
2862else
2863 if test -n "$PYTHON_FOR_GEN"; then
2864 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2865else
2866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2867for as_dir in $PATH
2868do
2869 IFS=$as_save_IFS
2870 test -z "$as_dir" && as_dir=.
2871 for ac_exec_ext in '' $ac_executable_extensions; do
2872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2873 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2875 break 2
2876 fi
2877done
2878 done
2879IFS=$as_save_IFS
2880
2881fi
2882fi
2883PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2884if test -n "$PYTHON_FOR_GEN"; then
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2886$as_echo "$PYTHON_FOR_GEN" >&6; }
2887else
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2889$as_echo "no" >&6; }
2890fi
2891
2892
2893 test -n "$PYTHON_FOR_GEN" && break
2894done
2895test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2896
2897if test "$PYTHON_FOR_GEN" = not-found; then
2898 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2899 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2900 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2901fi
2902
2903
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002904if test "$cross_compiling" = yes; then
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2906$as_echo_n "checking for python interpreter for cross build... " >&6; }
2907 if test -z "$PYTHON_FOR_BUILD"; then
2908 for interp in python$PACKAGE_VERSION python3 python; do
2909 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002910 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 +02002911 break
2912 fi
2913 interp=
2914 done
2915 if test x$interp = x; then
2916 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2917 fi
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2919$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002920 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 +02002921 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002922 # Used to comment out stuff for rebuilding generated files
2923 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002924elif test "$cross_compiling" = maybe; then
2925 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002926else
2927 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002928 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002929fi
2930
2931
Martin v. Löwis11437992002-04-12 09:54:03 +00002932
Martin Pantereac67be2016-07-28 01:28:27 +00002933
Benjamin Petersond23f8222009-04-05 19:13:16 +00002934if test "$prefix" != "/"; then
2935 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2936fi
2937
2938
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
2940
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002941# We don't use PACKAGE_ variables, and they cause conflicts
2942# with other autoconf-based packages that include Python.h
2943grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2944rm confdefs.h
2945mv confdefs.h.new confdefs.h
2946
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002947
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002948VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002949
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002950# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002951
2952SOVERSION=1.0
2953
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002954# The later defininition of _XOPEN_SOURCE disables certain features
2955# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2956
Matthias Kloseb9621712010-04-24 17:59:49 +00002957$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002958
2959
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002960# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2961# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2962# them.
2963
Matthias Kloseb9621712010-04-24 17:59:49 +00002964$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002965
2966
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002967# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2968# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2969# them.
2970
Matthias Kloseb9621712010-04-24 17:59:49 +00002971$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002972
2973
Martin v. Löwisd6320502004-08-12 13:45:08 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2975# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002978
2979
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2982# them.
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002985
2986
2987
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002988define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002989
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002990# Arguments passed to configure.
2991
2992CONFIG_ARGS="$ac_configure_args"
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2995$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002996# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002997if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002998 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002999 case $enableval in
3000 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003001 # Locate the best usable SDK, see Mac/README.txt for more
3002 # information
3003 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003004 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003005 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003006 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3007 if test ! -d "${enableval}"
3008 then
3009 enableval=/
3010 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003011 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003012 ;;
3013 esac
3014 case $enableval in
3015 no)
3016 UNIVERSALSDK=
3017 enable_universalsdk=
3018 ;;
3019 *)
3020 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003021 if test ! -d "${UNIVERSALSDK}"
3022 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003023 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003024 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003025 ;;
3026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003027
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029else
3030
3031 UNIVERSALSDK=
3032 enable_universalsdk=
3033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036if test -n "${UNIVERSALSDK}"
3037then
Matthias Kloseb9621712010-04-24 17:59:49 +00003038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3039$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040else
Matthias Kloseb9621712010-04-24 17:59:49 +00003041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3042$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003046
Ned Deily87adb6e2013-10-18 21:09:56 -07003047ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003048
Ned Deilycbfb9a52012-06-23 16:02:19 -07003049# For backward compatibility reasons we prefer to select '32-bit' if available,
3050# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003051UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003052if test "`uname -s`" = "Darwin"
3053then
3054 if test -n "${UNIVERSALSDK}"
3055 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003056 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057 then
3058 UNIVERSAL_ARCHS="intel"
3059 fi
3060 fi
3061fi
3062
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003063
Matthias Kloseb9621712010-04-24 17:59:49 +00003064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3065$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003066
3067# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003068if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003069 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070 UNIVERSAL_ARCHS="$withval"
3071
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072fi
3073
Ned Deily87adb6e2013-10-18 21:09:56 -07003074if test -n "${UNIVERSALSDK}"
3075then
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3077$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3078else
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3080$as_echo "no" >&6; }
3081fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003083
3084# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003086 withval=$with_framework_name;
3087 PYTHONFRAMEWORK=${withval}
3088 PYTHONFRAMEWORKDIR=${withval}.framework
3089 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3090
3091else
3092
3093 PYTHONFRAMEWORK=Python
3094 PYTHONFRAMEWORKDIR=Python.framework
3095 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3096
3097fi
3098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003099# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003100if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003101 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003102 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003103 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003104 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003105 esac
3106 case $enableval in
3107 no)
3108 PYTHONFRAMEWORK=
3109 PYTHONFRAMEWORKDIR=no-framework
3110 PYTHONFRAMEWORKPREFIX=
3111 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112 FRAMEWORKINSTALLFIRST=
3113 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003114 FRAMEWORKALTINSTALLFIRST=
3115 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003116 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003117 if test "x${prefix}" = "xNONE"; then
3118 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3119 else
3120 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3121 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003122 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003123 ;;
3124 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003125 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003127 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003128 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003129 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3130 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003131 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003132 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 if test "x${prefix}" = "xNONE" ; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 else
3138 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3139 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140
3141 case "${enableval}" in
3142 /System*)
3143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3144 if test "${prefix}" = "NONE" ; then
3145 # See below
3146 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3147 fi
3148 ;;
3149
3150 /Library*)
3151 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3152 ;;
3153
3154 */Library/Frameworks)
3155 MDIR="`dirname "${enableval}"`"
3156 MDIR="`dirname "${MDIR}"`"
3157 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3158
3159 if test "${prefix}" = "NONE"; then
3160 # User hasn't specified the
3161 # --prefix option, but wants to install
3162 # the framework in a non-default location,
3163 # ensure that the compatibility links get
3164 # installed relative to that prefix as well
3165 # instead of in /usr/local.
3166 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3167 fi
3168 ;;
3169
3170 *)
3171 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3172 ;;
3173 esac
3174
Jack Jansen127e56e2001-09-11 14:41:54 +00003175 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003176
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003177 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003183 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3184
3185 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3186
Jack Jansene578a632001-08-15 01:27:14 +00003187 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003188
Guido van Rossum563e7081996-09-10 18:20:48 +00003189else
Martin v. Löwis11437992002-04-12 09:54:03 +00003190
Jack Jansene578a632001-08-15 01:27:14 +00003191 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003193 PYTHONFRAMEWORKPREFIX=
3194 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195 FRAMEWORKINSTALLFIRST=
3196 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003197 FRAMEWORKALTINSTALLFIRST=
3198 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003199 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003200 if test "x${prefix}" = "xNONE" ; then
3201 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3202 else
3203 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3204 fi
Jack Jansene578a632001-08-15 01:27:14 +00003205 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003206
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208fi
3209
Thomas Wouters477c8d52006-05-27 19:21:47 +00003210
3211
Michael W. Hudson54241132001-12-07 15:38:26 +00003212
3213
3214
3215
Jack Jansene578a632001-08-15 01:27:14 +00003216
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217
3218
3219
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003220
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003221
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222
Jack Jansene578a632001-08-15 01:27:14 +00003223##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003224## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003225## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003226##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227# Set name for machine-dependent library files
3228
Matthias Kloseb9621712010-04-24 17:59:49 +00003229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3230$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003231if test -z "$MACHDEP"
3232then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003233 # avoid using uname for cross builds
3234 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003235 # ac_sys_system and ac_sys_release are used for setting
3236 # a lot of different things including 'define_xopen_source'
3237 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003238 case "$host" in
3239 *-*-linux*)
3240 ac_sys_system=Linux
3241 ;;
3242 *-*-cygwin*)
3243 ac_sys_system=Cygwin
3244 ;;
3245 *)
3246 # for now, limit cross builds to known configurations
3247 MACHDEP="unknown"
3248 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3249 esac
3250 ac_sys_release=
3251 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003252 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003253 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003254 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003255 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003256 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003257 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003259 fi
3260 ac_md_system=`echo $ac_sys_system |
3261 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3262 ac_md_release=`echo $ac_sys_release |
3263 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3264 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003265
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003266 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003267 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003268 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003269 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003270 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003271 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273fi
Guido van Rossum91922671997-10-09 20:24:13 +00003274
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003275
3276if test "$cross_compiling" = yes; then
3277 case "$host" in
3278 *-*-linux*)
3279 case "$host_cpu" in
3280 arm*)
3281 _host_cpu=arm
3282 ;;
3283 *)
3284 _host_cpu=$host_cpu
3285 esac
3286 ;;
3287 *-*-cygwin*)
3288 _host_cpu=
3289 ;;
3290 *)
3291 # for now, limit cross builds to known configurations
3292 MACHDEP="unknown"
3293 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3294 esac
3295 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3296fi
3297
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003298# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3299# disable features if it is defined, without any means to access these
3300# features as extensions. For these systems, we skip the definition of
3301# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3302# some feature, make sure there is no alternative way to access this
3303# feature. Also, when using wildcards, make sure you have verified the
3304# need for not defining _XOPEN_SOURCE on all systems matching the
3305# wildcard, and that the wildcard does not include future systems
3306# (which may remove their limitations).
3307case $ac_sys_system/$ac_sys_release in
3308 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3309 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003310 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003311 # In addition, Stefan Krah confirms that issue #1244610 exists through
3312 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003313 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003314 define_xopen_source=no
3315 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3316 # also defined. This can be overridden by defining _BSD_SOURCE
3317 # As this has a different meaning on Linux, only define it on OpenBSD
3318
Matthias Kloseb9621712010-04-24 17:59:49 +00003319$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003320
3321 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003322 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003323 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3324 # also defined. This can be overridden by defining _BSD_SOURCE
3325 # As this has a different meaning on Linux, only define it on OpenBSD
3326
Matthias Kloseb9621712010-04-24 17:59:49 +00003327$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003328
3329 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003330 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3331 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3332 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003333 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 +00003334 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003335 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3336 # request to enable features supported by the standard as a request
3337 # to disable features not supported by the standard. The best way
3338 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3339 # entirely and define __EXTENSIONS__ instead.
3340 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003341 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003342 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3343 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003344 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003345 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003346 define_xopen_source=no;;
3347 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003348 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003349 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003350 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003351 # On FreeBSD 4, the math functions C89 does not cover are never defined
3352 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3353 FreeBSD/4.*)
3354 define_xopen_source=no;;
3355 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3356 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3357 # identifies itself as Darwin/7.*
3358 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3359 # disables platform specific features beyond repair.
3360 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3361 # has no effect, don't bother defining them
3362 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003363 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003364 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003365 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003366 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3367 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3368 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003369 AIX/4)
3370 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003371 AIX/5)
3372 if test `uname -r` -eq 1; then
3373 define_xopen_source=no
3374 fi
3375 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003376 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3377 # defining NI_NUMERICHOST.
3378 QNX/6.3.2)
3379 define_xopen_source=no
3380 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003381
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003382esac
3383
3384if test $define_xopen_source = yes
3385then
Victor Stinner14d098d2011-09-07 22:29:43 +02003386 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003387
Victor Stinner14d098d2011-09-07 22:29:43 +02003388$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003389
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003390
3391 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3392 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3393 # several APIs are not declared. Since this is also needed in some
3394 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003395
Matthias Kloseb9621712010-04-24 17:59:49 +00003396$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003397
3398
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003399
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003400$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003402fi
3403
Christian Heimes647cd872013-12-07 23:39:33 +01003404# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3405case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003406 hp*|HP*)
3407 define_stdc_a1=yes;;
3408 *)
3409 define_stdc_a1=no;;
3410esac
3411
3412if test $define_stdc_a1 = yes
3413then
Christian Heimes647cd872013-12-07 23:39:33 +01003414
3415$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3416
Christian Heimesb02bcae2013-12-08 15:21:08 +01003417fi
Christian Heimes647cd872013-12-07 23:39:33 +01003418
Guido van Rossum91922671997-10-09 20:24:13 +00003419#
3420# SGI compilers allow the specification of the both the ABI and the
3421# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003422# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003423#
3424# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3425# thus supply support for various ABI/ISA combinations. The MACHDEP
3426# variable is also adjusted.
3427#
3428
3429if test ! -z "$SGI_ABI"
3430then
3431 CC="cc $SGI_ABI"
3432 LDFLAGS="$SGI_ABI $LDFLAGS"
3433 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3436$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003437
Jack Jansen6b08a402004-06-03 12:41:45 +00003438# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3439# it may influence the way we can build extensions, so distutils
3440# needs to check it
3441
Thomas Wouters477c8d52006-05-27 19:21:47 +00003442
Jack Jansen6b08a402004-06-03 12:41:45 +00003443CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003444EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003445
Guido van Rossum627b2d71993-12-24 10:39:16 +00003446# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003447
3448# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3449# for debug/optimization stuff. BASECFLAGS is for flags that are required
3450# just to get things to compile and link. Users are free to override OPT
3451# when running configure or make. The build should not break if they do.
3452# BASECFLAGS should generally not be messed with, however.
3453
3454# XXX shouldn't some/most/all of this code be merged with the stuff later
3455# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3457$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003460if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003462 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003463 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003464 without_gcc=yes;;
3465 yes) CC=gcc
3466 without_gcc=no;;
3467 *) CC=$withval
3468 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003469 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003470else
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003472 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003473 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003474 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003475 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003476 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003477fi
3478
Matthias Kloseb9621712010-04-24 17:59:49 +00003479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3480$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003481
Zachary Ware5af85642015-12-21 12:09:17 -06003482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3483$as_echo_n "checking for --with-icc... " >&6; }
3484
3485# Check whether --with-icc was given.
3486if test "${with_icc+set}" = set; then :
3487 withval=$with_icc;
3488 case $withval in
3489 no) CC=${CC:-cc}
3490 with_icc=no;;
3491 yes) CC=icc
3492 CXX=icpc
3493 with_icc=yes;;
3494 *) CC=$withval
3495 with_icc=$withval;;
3496 esac
3497else
3498
3499 with_icc=no
3500fi
3501
3502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3503$as_echo "$with_icc" >&6; }
3504
Guido van Rossum8b131c51995-03-09 14:10:13 +00003505# If the user switches compilers, we can't believe the cache
3506if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3507then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003508 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003509(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003510fi
3511
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003512# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3513# when the compiler supports them, but we don't always want -O2, and
3514# we set -g later.
3515if test -z "$CFLAGS"; then
3516 CFLAGS=
3517fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003518
3519if test "$ac_sys_system" = "Darwin"
3520then
3521 # Compiler selection on MacOSX is more complicated than
3522 # AC_PROG_CC can handle, see Mac/README.txt for more
3523 # information
3524 if test -z "${CC}"
3525 then
3526 found_gcc=
3527 found_clang=
3528 as_save_IFS=$IFS; IFS=:
3529 for as_dir in $PATH
3530 do
3531 IFS=$as_save_IFS
3532 if test -x $as_dir/gcc; then
3533 if test -z "${found_gcc}"; then
3534 found_gcc=$as_dir/gcc
3535 fi
3536 fi
3537 if test -x $as_dir/clang; then
3538 if test -z "${found_clang}"; then
3539 found_clang=$as_dir/clang
3540 fi
3541 fi
3542 done
3543 IFS=$as_save_IFS
3544
3545 if test -n "$found_gcc" -a -n "$found_clang"
3546 then
3547 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3548 then
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3550$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3551 CC="$found_clang"
3552 CXX="$found_clang++"
3553 fi
3554
3555
3556 elif test -z "$found_gcc" -a -n "$found_clang"
3557 then
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3559$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3560 CC="$found_clang"
3561 CXX="$found_clang++"
3562
3563 elif test -z "$found_gcc" -a -z "$found_clang"
3564 then
3565 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3566 if test -n "${found_clang}"
3567 then
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3569$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3570 CC="${found_clang}"
3571 CXX="`/usr/bin/xcrun -find clang++`"
3572
3573 # else: use default behaviour
3574 fi
3575 fi
3576 fi
3577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003578ac_ext=c
3579ac_cpp='$CPP $CPPFLAGS'
3580ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3581ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3582ac_compiler_gnu=$ac_cv_c_compiler_gnu
3583if test -n "$ac_tool_prefix"; then
3584 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3585set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3587$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003588if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003590else
3591 if test -n "$CC"; then
3592 ac_cv_prog_CC="$CC" # Let the user override the test.
3593else
Martin v. Löwis11437992002-04-12 09:54:03 +00003594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 $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 +00003603 break 2
3604 fi
3605done
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003608
Jack Jansendd19cf82001-12-06 22:36:17 +00003609fi
3610fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003611CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003612if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3614$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003615else
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3617$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003618fi
3619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621fi
3622if test -z "$ac_cv_prog_CC"; then
3623 ac_ct_CC=$CC
3624 # Extract the first word of "gcc", so it can be a program name with args.
3625set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3627$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003628if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003630else
3631 if test -n "$ac_ct_CC"; then
3632 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3633else
3634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3635for as_dir in $PATH
3636do
3637 IFS=$as_save_IFS
3638 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 $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 +00003643 break 2
3644 fi
3645done
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003648
3649fi
3650fi
3651ac_ct_CC=$ac_cv_prog_ac_ct_CC
3652if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3654$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3657$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658fi
3659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 if test "x$ac_ct_CC" = x; then
3661 CC=""
3662 else
3663 case $cross_compiling:$ac_tool_warned in
3664yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667ac_tool_warned=yes ;;
3668esac
3669 CC=$ac_ct_CC
3670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
3672 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003673fi
3674
Jack Jansendd19cf82001-12-06 22:36:17 +00003675if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 if test -n "$ac_tool_prefix"; then
3677 # 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 +00003678set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3680$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003681if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003683else
3684 if test -n "$CC"; then
3685 ac_cv_prog_CC="$CC" # Let the user override the test.
3686else
Martin v. Löwis11437992002-04-12 09:54:03 +00003687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3688for as_dir in $PATH
3689do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $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 +00003696 break 2
3697 fi
3698done
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
3702fi
3703fi
3704CC=$ac_cv_prog_CC
3705if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3707$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003708else
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3710$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003711fi
3712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713
Martin v. Löwis11437992002-04-12 09:54:03 +00003714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716if test -z "$CC"; then
3717 # Extract the first word of "cc", so it can be a program name with args.
3718set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3720$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003721if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003723else
3724 if test -n "$CC"; then
3725 ac_cv_prog_CC="$CC" # Let the user override the test.
3726else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003727 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3736 ac_prog_rejected=yes
3737 continue
3738 fi
3739 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $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 +00003741 break 2
3742 fi
3743done
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003746
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747if test $ac_prog_rejected = yes; then
3748 # We found a bogon in the path, so make sure we never use it.
3749 set dummy $ac_cv_prog_CC
3750 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 # We chose a different compiler from the bogus one.
3753 # However, it has the same basename, so the bogon will be chosen
3754 # first if we set CC to just the basename; use the full file name.
3755 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003756 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757 fi
3758fi
3759fi
3760fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003761CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3764$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003765else
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3767$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768fi
3769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
3772if test -z "$CC"; then
3773 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 do
3776 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3777set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3779$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003780if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003782else
3783 if test -n "$CC"; then
3784 ac_cv_prog_CC="$CC" # Let the user override the test.
3785else
Martin v. Löwis11437992002-04-12 09:54:03 +00003786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3787for as_dir in $PATH
3788do
3789 IFS=$as_save_IFS
3790 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $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 +00003795 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003797done
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003800
3801fi
3802fi
3803CC=$ac_cv_prog_CC
3804if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3806$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3809$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003810fi
3811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 test -n "$CC" && break
3814 done
3815fi
3816if test -z "$CC"; then
3817 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003819do
3820 # Extract the first word of "$ac_prog", so it can be a program name with args.
3821set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003824if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003826else
3827 if test -n "$ac_ct_CC"; then
3828 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3829else
3830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3831for as_dir in $PATH
3832do
3833 IFS=$as_save_IFS
3834 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003837 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 $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 +00003839 break 2
3840 fi
3841done
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846fi
3847ac_ct_CC=$ac_cv_prog_ac_ct_CC
3848if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3850$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3853$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003854fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857 test -n "$ac_ct_CC" && break
3858done
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860 if test "x$ac_ct_CC" = x; then
3861 CC=""
3862 else
3863 case $cross_compiling:$ac_tool_warned in
3864yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867ac_tool_warned=yes ;;
3868esac
3869 CC=$ac_ct_CC
3870 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
3872
3873fi
3874
3875
Matthias Kloseb9621712010-04-24 17:59:49 +00003876test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003878as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003879See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880
3881# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003882$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3883set X $ac_compile
3884ac_compiler=$2
3885for ac_option in --version -v -V -qversion; do
3886 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887case "(($ac_try" in
3888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3889 *) ac_try_echo=$ac_try;;
3890esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3892$as_echo "$ac_try_echo"; } >&5
3893 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 if test -s conftest.err; then
3896 sed '10a\
3897... rest of stderr output deleted ...
3898 10q' conftest.err >conftest.er1
3899 cat conftest.er1 >&5
3900 fi
3901 rm -f conftest.er1 conftest.err
3902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3903 test $ac_status = 0; }
3904done
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
Matthias Kloseb9621712010-04-24 17:59:49 +00003906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003907/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003908
Martin v. Löwis11437992002-04-12 09:54:03 +00003909int
3910main ()
3911{
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
3917ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003918ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003919# Try to create an executable without -o first, disregard a.out.
3920# It will help us diagnose broken compilers, and finding out an intuition
3921# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3923$as_echo_n "checking whether the C compiler works... " >&6; }
3924ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3925
3926# The possible output files:
3927ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929ac_rmfiles=
3930for ac_file in $ac_files
3931do
3932 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3935 esac
3936done
3937rm -f $ac_rmfiles
3938
Matthias Kloseb9621712010-04-24 17:59:49 +00003939if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940case "(($ac_try" in
3941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3942 *) ac_try_echo=$ac_try;;
3943esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3945$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3951# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3952# in a Makefile. We should not override ac_cv_exeext if it was cached,
3953# so that the user can short-circuit this test for compilers unknown to
3954# Autoconf.
3955for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003956do
3957 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960 ;;
3961 [ab].out )
3962 # We found the default executable, but exeext='' is most
3963 # certainly right.
3964 break;;
3965 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 then :; else
3968 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3969 fi
3970 # We set ac_cv_exeext here because the later test for it is not
3971 # safe: cross compilers may not add the suffix if given an `-o'
3972 # argument, so we may need to know it at that point already.
3973 # Even if this section looks crufty: it has the advantage of
3974 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975 break;;
3976 * )
3977 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 esac
3979done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003980test "$ac_cv_exeext" = no && ac_cv_exeext=
3981
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003982else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983 ac_file=''
3984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003985if test -z "$ac_file"; then :
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3987$as_echo "no" >&6; }
3988$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003989sed 's/^/| /' conftest.$ac_ext >&5
3990
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003993as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003994See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003995else
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3997$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4000$as_echo_n "checking for C compiler default output file name... " >&6; }
4001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4002$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4008$as_echo_n "checking for suffix of executables... " >&6; }
4009if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4021# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4022# work properly (i.e., refer to `conftest.exe'), while it won't with
4023# `rm'.
4024for ac_file in conftest.exe conftest conftest.*; do
4025 test -f "$ac_file" || continue
4026 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4029 break;;
4030 * ) break;;
4031 esac
4032done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033else
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004036as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004037See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004039rm -f conftest conftest$ac_cv_exeext
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4041$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042
4043rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004044EXEEXT=$ac_cv_exeext
4045ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4047/* end confdefs.h. */
4048#include <stdio.h>
4049int
4050main ()
4051{
4052FILE *f = fopen ("conftest.out", "w");
4053 return ferror (f) || fclose (f) != 0;
4054
4055 ;
4056 return 0;
4057}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004059ac_clean_files="$ac_clean_files conftest.out"
4060# Check that the compiler produces executables we can run. If not, either
4061# the compiler is broken, or we cross compile.
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4063$as_echo_n "checking whether we are cross compiling... " >&6; }
4064if test "$cross_compiling" != yes; then
4065 { { ac_try="$ac_link"
4066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
4070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4071$as_echo "$ac_try_echo"; } >&5
4072 (eval "$ac_link") 2>&5
4073 ac_status=$?
4074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4075 test $ac_status = 0; }
4076 if { ac_try='./conftest$ac_cv_exeext'
4077 { { case "(($ac_try" in
4078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079 *) ac_try_echo=$ac_try;;
4080esac
4081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082$as_echo "$ac_try_echo"; } >&5
4083 (eval "$ac_try") 2>&5
4084 ac_status=$?
4085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086 test $ac_status = 0; }; }; then
4087 cross_compiling=no
4088 else
4089 if test "$cross_compiling" = maybe; then
4090 cross_compiling=yes
4091 else
4092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004094as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004095If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004096See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 fi
4098 fi
4099fi
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4101$as_echo "$cross_compiling" >&6; }
4102
4103rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4104ac_clean_files=$ac_clean_files_save
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4106$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004107if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 $as_echo_n "(cached) " >&6
4109else
4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004111/* end confdefs.h. */
4112
4113int
4114main ()
4115{
4116
4117 ;
4118 return 0;
4119}
4120_ACEOF
4121rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004122if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123case "(($ac_try" in
4124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4125 *) ac_try_echo=$ac_try;;
4126esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4128$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4132 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133 for ac_file in conftest.o conftest.obj conftest.*; do
4134 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004137 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4138 break;;
4139 esac
4140done
4141else
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004143sed 's/^/| /' conftest.$ac_ext >&5
4144
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004147as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004148See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004149fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4153$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004154OBJEXT=$ac_cv_objext
4155ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4157$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004158if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004160else
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004163
Martin v. Löwis11437992002-04-12 09:54:03 +00004164int
4165main ()
4166{
4167#ifndef __GNUC__
4168 choke me
4169#endif
4170
4171 ;
4172 return 0;
4173}
4174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 ac_compiler_gnu=yes
4177else
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004181ac_cv_c_compiler_gnu=$ac_compiler_gnu
4182
4183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4185$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4186if test $ac_compiler_gnu = yes; then
4187 GCC=yes
4188else
4189 GCC=
4190fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004191ac_test_CFLAGS=${CFLAGS+set}
4192ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4194$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004195if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004197else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198 ac_save_c_werror_flag=$ac_c_werror_flag
4199 ac_c_werror_flag=yes
4200 ac_cv_prog_cc_g=no
4201 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204
Martin v. Löwis11437992002-04-12 09:54:03 +00004205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004214 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004215else
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 CFLAGS=""
4217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218/* end confdefs.h. */
4219
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004228if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229
Matthias Kloseb9621712010-04-24 17:59:49 +00004230else
4231 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234/* end confdefs.h. */
4235
4236int
4237main ()
4238{
4239
4240 ;
4241 return 0;
4242}
4243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004244if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4252 ac_c_werror_flag=$ac_save_c_werror_flag
4253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4255$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258elif test $ac_cv_prog_cc_g = yes; then
4259 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004260 CFLAGS="-g -O2"
4261 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263 fi
4264else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004265 if test "$GCC" = yes; then
4266 CFLAGS="-O2"
4267 else
4268 CFLAGS=
4269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4272$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004273if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004275else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004277ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* end confdefs.h. */
4280#include <stdarg.h>
4281#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004282struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4284struct buf { int x; };
4285FILE * (*rcsopen) (struct buf *, struct stat *, int);
4286static char *e (p, i)
4287 char **p;
4288 int i;
4289{
4290 return p[i];
4291}
4292static char *f (char * (*g) (char **, int), char **p, ...)
4293{
4294 char *s;
4295 va_list v;
4296 va_start (v,p);
4297 s = g (p, va_arg (v,int));
4298 va_end (v);
4299 return s;
4300}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301
4302/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4303 function prototypes and stuff, but not '\xHH' hex character constants.
4304 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4307 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004309int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4312 inside strings and character constants. */
4313#define FOO(x) 'x'
4314int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4315
Skip Montanaro6dead952003-09-25 14:50:04 +00004316int test (int i, double x);
4317struct s1 {int (*f) (int a);};
4318struct s2 {int (*f) (double a);};
4319int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4320int argc;
4321char **argv;
4322int
4323main ()
4324{
4325return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4326 ;
4327 return 0;
4328}
4329_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4331 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004332do
4333 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337rm -f core conftest.err conftest.$ac_objext
4338 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004339done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004341CC=$ac_save_CC
4342
4343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344# AC_CACHE_VAL
4345case "x$ac_cv_prog_cc_c89" in
4346 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4348$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4351$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004352 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4355$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004356esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004358
Matthias Kloseb9621712010-04-24 17:59:49 +00004359fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004360
Martin v. Löwis11437992002-04-12 09:54:03 +00004361ac_ext=c
4362ac_cpp='$CPP $CPPFLAGS'
4363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4365ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004366
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004367ac_ext=c
4368ac_cpp='$CPP $CPPFLAGS'
4369ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4370ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4371ac_compiler_gnu=$ac_cv_c_compiler_gnu
4372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4373$as_echo_n "checking how to run the C preprocessor... " >&6; }
4374# On Suns, sometimes $CPP names a directory.
4375if test -n "$CPP" && test -d "$CPP"; then
4376 CPP=
4377fi
4378if test -z "$CPP"; then
4379 if ${ac_cv_prog_CPP+:} false; then :
4380 $as_echo_n "(cached) " >&6
4381else
4382 # Double quotes because CPP needs to be expanded
4383 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4384 do
4385 ac_preproc_ok=false
4386for ac_c_preproc_warn_flag in '' yes
4387do
4388 # Use a header file that comes with gcc, so configuring glibc
4389 # with a fresh cross-compiler works.
4390 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4391 # <limits.h> exists even on freestanding compilers.
4392 # On the NeXT, cc -E runs the code through the compiler's parser,
4393 # not just through cpp. "Syntax error" is here to catch this case.
4394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4395/* end confdefs.h. */
4396#ifdef __STDC__
4397# include <limits.h>
4398#else
4399# include <assert.h>
4400#endif
4401 Syntax error
4402_ACEOF
4403if ac_fn_c_try_cpp "$LINENO"; then :
4404
4405else
4406 # Broken: fails on valid input.
4407continue
4408fi
4409rm -f conftest.err conftest.i conftest.$ac_ext
4410
4411 # OK, works on sane cases. Now check whether nonexistent headers
4412 # can be detected and how.
4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4414/* end confdefs.h. */
4415#include <ac_nonexistent.h>
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418 # Broken: success on invalid input.
4419continue
4420else
4421 # Passes both tests.
4422ac_preproc_ok=:
4423break
4424fi
4425rm -f conftest.err conftest.i conftest.$ac_ext
4426
4427done
4428# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4429rm -f conftest.i conftest.err conftest.$ac_ext
4430if $ac_preproc_ok; then :
4431 break
4432fi
4433
4434 done
4435 ac_cv_prog_CPP=$CPP
4436
4437fi
4438 CPP=$ac_cv_prog_CPP
4439else
4440 ac_cv_prog_CPP=$CPP
4441fi
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4443$as_echo "$CPP" >&6; }
4444ac_preproc_ok=false
4445for ac_c_preproc_warn_flag in '' yes
4446do
4447 # Use a header file that comes with gcc, so configuring glibc
4448 # with a fresh cross-compiler works.
4449 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4450 # <limits.h> exists even on freestanding compilers.
4451 # On the NeXT, cc -E runs the code through the compiler's parser,
4452 # not just through cpp. "Syntax error" is here to catch this case.
4453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4454/* end confdefs.h. */
4455#ifdef __STDC__
4456# include <limits.h>
4457#else
4458# include <assert.h>
4459#endif
4460 Syntax error
4461_ACEOF
4462if ac_fn_c_try_cpp "$LINENO"; then :
4463
4464else
4465 # Broken: fails on valid input.
4466continue
4467fi
4468rm -f conftest.err conftest.i conftest.$ac_ext
4469
4470 # OK, works on sane cases. Now check whether nonexistent headers
4471 # can be detected and how.
4472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473/* end confdefs.h. */
4474#include <ac_nonexistent.h>
4475_ACEOF
4476if ac_fn_c_try_cpp "$LINENO"; then :
4477 # Broken: success on invalid input.
4478continue
4479else
4480 # Passes both tests.
4481ac_preproc_ok=:
4482break
4483fi
4484rm -f conftest.err conftest.i conftest.$ac_ext
4485
4486done
4487# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4488rm -f conftest.i conftest.err conftest.$ac_ext
4489if $ac_preproc_ok; then :
4490
4491else
4492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4494as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4495See \`config.log' for more details" "$LINENO" 5; }
4496fi
4497
4498ac_ext=c
4499ac_cpp='$CPP $CPPFLAGS'
4500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4502ac_compiler_gnu=$ac_cv_c_compiler_gnu
4503
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4505$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4506if ${ac_cv_path_GREP+:} false; then :
4507 $as_echo_n "(cached) " >&6
4508else
4509 if test -z "$GREP"; then
4510 ac_path_GREP_found=false
4511 # Loop through the user's path and test for each of PROGNAME-LIST
4512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4513for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4514do
4515 IFS=$as_save_IFS
4516 test -z "$as_dir" && as_dir=.
4517 for ac_prog in grep ggrep; do
4518 for ac_exec_ext in '' $ac_executable_extensions; do
4519 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4520 as_fn_executable_p "$ac_path_GREP" || continue
4521# Check for GNU ac_path_GREP and select it if it is found.
4522 # Check for GNU $ac_path_GREP
4523case `"$ac_path_GREP" --version 2>&1` in
4524*GNU*)
4525 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4526*)
4527 ac_count=0
4528 $as_echo_n 0123456789 >"conftest.in"
4529 while :
4530 do
4531 cat "conftest.in" "conftest.in" >"conftest.tmp"
4532 mv "conftest.tmp" "conftest.in"
4533 cp "conftest.in" "conftest.nl"
4534 $as_echo 'GREP' >> "conftest.nl"
4535 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4536 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4537 as_fn_arith $ac_count + 1 && ac_count=$as_val
4538 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4539 # Best one so far, save it but keep looking for a better one
4540 ac_cv_path_GREP="$ac_path_GREP"
4541 ac_path_GREP_max=$ac_count
4542 fi
4543 # 10*(2^10) chars as input seems more than enough
4544 test $ac_count -gt 10 && break
4545 done
4546 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4547esac
4548
4549 $ac_path_GREP_found && break 3
4550 done
4551 done
4552 done
4553IFS=$as_save_IFS
4554 if test -z "$ac_cv_path_GREP"; then
4555 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4556 fi
4557else
4558 ac_cv_path_GREP=$GREP
4559fi
4560
4561fi
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4563$as_echo "$ac_cv_path_GREP" >&6; }
4564 GREP="$ac_cv_path_GREP"
4565
4566
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004567
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568
4569
Matthias Kloseb9621712010-04-24 17:59:49 +00004570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4571$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004573# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004574if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004575 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004576
4577 case $withval in
4578 no) with_cxx_main=no
4579 MAINCC='$(CC)';;
4580 yes) with_cxx_main=yes
4581 MAINCC='$(CXX)';;
4582 *) with_cxx_main=yes
4583 MAINCC=$withval
4584 if test -z "$CXX"
4585 then
4586 CXX=$withval
4587 fi;;
4588 esac
4589else
4590
4591 with_cxx_main=no
4592 MAINCC='$(CC)'
4593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004594fi
4595
Matthias Kloseb9621712010-04-24 17:59:49 +00004596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4597$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004598
4599preset_cxx="$CXX"
4600if test -z "$CXX"
4601then
4602 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004603 gcc) if test -n "$ac_tool_prefix"; then
4604 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4605set dummy ${ac_tool_prefix}g++; ac_word=$2
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4607$as_echo_n "checking for $ac_word... " >&6; }
4608if ${ac_cv_path_CXX+:} false; then :
4609 $as_echo_n "(cached) " >&6
4610else
4611 case $CXX in
4612 [\\/]* | ?:[\\/]*)
4613 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4614 ;;
4615 *)
4616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4617for as_dir in notfound
4618do
4619 IFS=$as_save_IFS
4620 test -z "$as_dir" && as_dir=.
4621 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4625 break 2
4626 fi
4627done
4628 done
4629IFS=$as_save_IFS
4630
4631 ;;
4632esac
4633fi
4634CXX=$ac_cv_path_CXX
4635if test -n "$CXX"; then
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4637$as_echo "$CXX" >&6; }
4638else
4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4640$as_echo "no" >&6; }
4641fi
4642
4643
4644fi
4645if test -z "$ac_cv_path_CXX"; then
4646 ac_pt_CXX=$CXX
4647 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4650$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004651if ${ac_cv_path_ac_pt_CXX+:} false; then :
4652 $as_echo_n "(cached) " >&6
4653else
4654 case $ac_pt_CXX in
4655 [\\/]* | ?:[\\/]*)
4656 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4657 ;;
4658 *)
4659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4660for as_dir in notfound
4661do
4662 IFS=$as_save_IFS
4663 test -z "$as_dir" && as_dir=.
4664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004666 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4668 break 2
4669 fi
4670done
4671 done
4672IFS=$as_save_IFS
4673
4674 ;;
4675esac
4676fi
4677ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4678if test -n "$ac_pt_CXX"; then
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4680$as_echo "$ac_pt_CXX" >&6; }
4681else
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4683$as_echo "no" >&6; }
4684fi
4685
4686 if test "x$ac_pt_CXX" = x; then
4687 CXX="g++"
4688 else
4689 case $cross_compiling:$ac_tool_warned in
4690yes:)
4691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4693ac_tool_warned=yes ;;
4694esac
4695 CXX=$ac_pt_CXX
4696 fi
4697else
4698 CXX="$ac_cv_path_CXX"
4699fi
4700 ;;
4701 cc) if test -n "$ac_tool_prefix"; then
4702 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4703set dummy ${ac_tool_prefix}c++; ac_word=$2
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004706if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708else
4709 case $CXX in
4710 [\\/]* | ?:[\\/]*)
4711 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4712 ;;
4713 *)
4714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4715for as_dir in notfound
4716do
4717 IFS=$as_save_IFS
4718 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004723 break 2
4724 fi
4725done
Matthias Kloseb9621712010-04-24 17:59:49 +00004726 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004727IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004729 ;;
4730esac
4731fi
4732CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004733if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4735$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004736else
Matthias Kloseb9621712010-04-24 17:59:49 +00004737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4738$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004740
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004741
4742fi
4743if test -z "$ac_cv_path_CXX"; then
4744 ac_pt_CXX=$CXX
4745 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4748$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004749if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004752 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754 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 +00004755 ;;
4756 *)
4757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4758for as_dir in notfound
4759do
4760 IFS=$as_save_IFS
4761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 break 2
4767 fi
4768done
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004770IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772 ;;
4773esac
4774fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4776if test -n "$ac_pt_CXX"; then
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4778$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004779else
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4781$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 if test "x$ac_pt_CXX" = x; then
4785 CXX="c++"
4786 else
4787 case $cross_compiling:$ac_tool_warned in
4788yes:)
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4791ac_tool_warned=yes ;;
4792esac
4793 CXX=$ac_pt_CXX
4794 fi
4795else
4796 CXX="$ac_cv_path_CXX"
4797fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799 clang|*/clang) if test -n "$ac_tool_prefix"; then
4800 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4801set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4803$as_echo_n "checking for $ac_word... " >&6; }
4804if ${ac_cv_path_CXX+:} false; then :
4805 $as_echo_n "(cached) " >&6
4806else
4807 case $CXX in
4808 [\\/]* | ?:[\\/]*)
4809 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4810 ;;
4811 *)
4812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4813for as_dir in notfound
4814do
4815 IFS=$as_save_IFS
4816 test -z "$as_dir" && as_dir=.
4817 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004818 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004819 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4820 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4821 break 2
4822 fi
4823done
4824 done
4825IFS=$as_save_IFS
4826
Ned Deilycbfb9a52012-06-23 16:02:19 -07004827 ;;
4828esac
4829fi
4830CXX=$ac_cv_path_CXX
4831if test -n "$CXX"; then
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4833$as_echo "$CXX" >&6; }
4834else
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4836$as_echo "no" >&6; }
4837fi
4838
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839
4840fi
4841if test -z "$ac_cv_path_CXX"; then
4842 ac_pt_CXX=$CXX
4843 # Extract the first word of "clang++", so it can be a program name with args.
4844set dummy clang++; ac_word=$2
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4846$as_echo_n "checking for $ac_word... " >&6; }
4847if ${ac_cv_path_ac_pt_CXX+:} false; then :
4848 $as_echo_n "(cached) " >&6
4849else
4850 case $ac_pt_CXX in
4851 [\\/]* | ?:[\\/]*)
4852 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4853 ;;
4854 *)
4855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856for as_dir in notfound
4857do
4858 IFS=$as_save_IFS
4859 test -z "$as_dir" && as_dir=.
4860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004862 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4864 break 2
4865 fi
4866done
4867 done
4868IFS=$as_save_IFS
4869
4870 ;;
4871esac
4872fi
4873ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4874if test -n "$ac_pt_CXX"; then
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4876$as_echo "$ac_pt_CXX" >&6; }
4877else
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4879$as_echo "no" >&6; }
4880fi
4881
4882 if test "x$ac_pt_CXX" = x; then
4883 CXX="clang++"
4884 else
4885 case $cross_compiling:$ac_tool_warned in
4886yes:)
4887{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4888$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4889ac_tool_warned=yes ;;
4890esac
4891 CXX=$ac_pt_CXX
4892 fi
4893else
4894 CXX="$ac_cv_path_CXX"
4895fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004896 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004897 icc|*/icc) if test -n "$ac_tool_prefix"; then
4898 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4899set dummy ${ac_tool_prefix}icpc; ac_word=$2
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4901$as_echo_n "checking for $ac_word... " >&6; }
4902if ${ac_cv_path_CXX+:} false; then :
4903 $as_echo_n "(cached) " >&6
4904else
4905 case $CXX in
4906 [\\/]* | ?:[\\/]*)
4907 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4908 ;;
4909 *)
4910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4911for as_dir in notfound
4912do
4913 IFS=$as_save_IFS
4914 test -z "$as_dir" && as_dir=.
4915 for ac_exec_ext in '' $ac_executable_extensions; do
4916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4917 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4919 break 2
4920 fi
4921done
4922 done
4923IFS=$as_save_IFS
4924
4925 ;;
4926esac
4927fi
4928CXX=$ac_cv_path_CXX
4929if test -n "$CXX"; then
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4931$as_echo "$CXX" >&6; }
4932else
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4934$as_echo "no" >&6; }
4935fi
4936
4937
4938fi
4939if test -z "$ac_cv_path_CXX"; then
4940 ac_pt_CXX=$CXX
4941 # Extract the first word of "icpc", so it can be a program name with args.
4942set dummy icpc; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if ${ac_cv_path_ac_pt_CXX+:} false; then :
4946 $as_echo_n "(cached) " >&6
4947else
4948 case $ac_pt_CXX in
4949 [\\/]* | ?:[\\/]*)
4950 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4951 ;;
4952 *)
4953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in notfound
4955do
4956 IFS=$as_save_IFS
4957 test -z "$as_dir" && as_dir=.
4958 for ac_exec_ext in '' $ac_executable_extensions; do
4959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4960 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962 break 2
4963 fi
4964done
4965 done
4966IFS=$as_save_IFS
4967
4968 ;;
4969esac
4970fi
4971ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4972if test -n "$ac_pt_CXX"; then
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4974$as_echo "$ac_pt_CXX" >&6; }
4975else
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980 if test "x$ac_pt_CXX" = x; then
4981 CXX="icpc"
4982 else
4983 case $cross_compiling:$ac_tool_warned in
4984yes:)
4985{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4986$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4987ac_tool_warned=yes ;;
4988esac
4989 CXX=$ac_pt_CXX
4990 fi
4991else
4992 CXX="$ac_cv_path_CXX"
4993fi
4994 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004995 esac
4996 if test "$CXX" = "notfound"
4997 then
4998 CXX=""
4999 fi
5000fi
5001if test -z "$CXX"
5002then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005003 if test -n "$ac_tool_prefix"; then
5004 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5005 do
5006 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5007set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005010if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005012else
5013 if test -n "$CXX"; then
5014 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5015else
5016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017for as_dir in $PATH
5018do
5019 IFS=$as_save_IFS
5020 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005022 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005023 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005025 break 2
5026 fi
5027done
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005030
5031fi
5032fi
5033CXX=$ac_cv_prog_CXX
5034if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5036$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037else
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005040fi
5041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005043 test -n "$CXX" && break
5044 done
5045fi
5046if test -z "$CXX"; then
5047 ac_ct_CXX=$CXX
5048 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5049do
5050 # Extract the first word of "$ac_prog", so it can be a program name with args.
5051set dummy $ac_prog; ac_word=$2
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5053$as_echo_n "checking for $ac_word... " >&6; }
5054if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5055 $as_echo_n "(cached) " >&6
5056else
5057 if test -n "$ac_ct_CXX"; then
5058 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5059else
5060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5061for as_dir in $PATH
5062do
5063 IFS=$as_save_IFS
5064 test -z "$as_dir" && as_dir=.
5065 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005067 ac_cv_prog_ac_ct_CXX="$ac_prog"
5068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5069 break 2
5070 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005071done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005072 done
5073IFS=$as_save_IFS
5074
5075fi
5076fi
5077ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5078if test -n "$ac_ct_CXX"; then
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5080$as_echo "$ac_ct_CXX" >&6; }
5081else
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083$as_echo "no" >&6; }
5084fi
5085
5086
5087 test -n "$ac_ct_CXX" && break
5088done
5089
5090 if test "x$ac_ct_CXX" = x; then
5091 CXX="notfound"
5092 else
5093 case $cross_compiling:$ac_tool_warned in
5094yes:)
5095{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5096$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5097ac_tool_warned=yes ;;
5098esac
5099 CXX=$ac_ct_CXX
5100 fi
5101fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102
5103 if test "$CXX" = "notfound"
5104 then
5105 CXX=""
5106 fi
5107fi
5108if test "$preset_cxx" != "$CXX"
5109then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005110 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005111
5112 By default, distutils will build C++ extension modules with \"$CXX\".
5113 If this is not intended, then set CXX on the configure command line.
5114 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005115$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116
5117 By default, distutils will build C++ extension modules with \"$CXX\".
5118 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005119 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120fi
5121
5122
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005123MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5124
5125
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5127$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5128cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005129#undef bfin
5130#undef cris
5131#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005132#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005133#undef hppa
5134#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005135#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005136#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005137#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005138#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005139#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005140#if defined(__ANDROID__)
5141# if defined(__x86_64__) && defined(__LP64__)
5142 x86_64-linux-android
5143# elif defined(__i386__)
5144 i686-linux-android
5145# elif defined(__aarch64__) && defined(__AARCH64EL__)
5146# if defined(__ILP32__)
5147 aarch64_ilp32-linux-android
5148# else
5149 aarch64-linux-android
5150# endif
5151# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5152 arm-linux-androideabi
5153# elif defined(__mips_hard_float) && defined(_MIPSEL)
5154# if _MIPS_SIM == _ABIO32
5155 mipsel-linux-android
5156# elif _MIPS_SIM == _ABI64
5157 mips64el-linux-android
5158# else
5159# error unknown platform triplet
5160# endif
5161# else
5162# error unknown platform triplet
5163# endif
5164#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005165# if defined(__x86_64__) && defined(__LP64__)
5166 x86_64-linux-gnu
5167# elif defined(__x86_64__) && defined(__ILP32__)
5168 x86_64-linux-gnux32
5169# elif defined(__i386__)
5170 i386-linux-gnu
5171# elif defined(__aarch64__) && defined(__AARCH64EL__)
5172# if defined(__ILP32__)
5173 aarch64_ilp32-linux-gnu
5174# else
5175 aarch64-linux-gnu
5176# endif
5177# elif defined(__aarch64__) && defined(__AARCH64EB__)
5178# if defined(__ILP32__)
5179 aarch64_be_ilp32-linux-gnu
5180# else
5181 aarch64_be-linux-gnu
5182# endif
5183# elif defined(__alpha__)
5184 alpha-linux-gnu
5185# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5186# if defined(__ARMEL__)
5187 arm-linux-gnueabihf
5188# else
5189 armeb-linux-gnueabihf
5190# endif
5191# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5192# if defined(__ARMEL__)
5193 arm-linux-gnueabi
5194# else
5195 armeb-linux-gnueabi
5196# endif
5197# elif defined(__hppa__)
5198 hppa-linux-gnu
5199# elif defined(__ia64__)
5200 ia64-linux-gnu
5201# elif defined(__m68k__) && !defined(__mcoldfire__)
5202 m68k-linux-gnu
5203# elif defined(__mips_hard_float) && defined(_MIPSEL)
5204# if _MIPS_SIM == _ABIO32
5205 mipsel-linux-gnu
5206# elif _MIPS_SIM == _ABIN32
5207 mips64el-linux-gnuabin32
5208# elif _MIPS_SIM == _ABI64
5209 mips64el-linux-gnuabi64
5210# else
5211# error unknown platform triplet
5212# endif
5213# elif defined(__mips_hard_float)
5214# if _MIPS_SIM == _ABIO32
5215 mips-linux-gnu
5216# elif _MIPS_SIM == _ABIN32
5217 mips64-linux-gnuabin32
5218# elif _MIPS_SIM == _ABI64
5219 mips64-linux-gnuabi64
5220# else
5221# error unknown platform triplet
5222# endif
5223# elif defined(__or1k__)
5224 or1k-linux-gnu
5225# elif defined(__powerpc__) && defined(__SPE__)
5226 powerpc-linux-gnuspe
5227# elif defined(__powerpc64__)
5228# if defined(__LITTLE_ENDIAN__)
5229 powerpc64le-linux-gnu
5230# else
5231 powerpc64-linux-gnu
5232# endif
5233# elif defined(__powerpc__)
5234 powerpc-linux-gnu
5235# elif defined(__s390x__)
5236 s390x-linux-gnu
5237# elif defined(__s390__)
5238 s390-linux-gnu
5239# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5240 sh4-linux-gnu
5241# elif defined(__sparc__) && defined(__arch64__)
5242 sparc64-linux-gnu
5243# elif defined(__sparc__)
5244 sparc-linux-gnu
5245# else
5246# error unknown platform triplet
5247# endif
5248#elif defined(__FreeBSD_kernel__)
5249# if defined(__LP64__)
5250 x86_64-kfreebsd-gnu
5251# elif defined(__i386__)
5252 i386-kfreebsd-gnu
5253# else
5254# error unknown platform triplet
5255# endif
5256#elif defined(__gnu_hurd__)
5257 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005258#elif defined(__APPLE__)
5259 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005260#else
5261# error unknown platform triplet
5262#endif
5263
5264EOF
5265
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005266if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005267 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5269$as_echo "$PLATFORM_TRIPLET" >&6; }
5270else
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5272$as_echo "none" >&6; }
5273fi
5274rm -f conftest.c conftest.out
5275
5276if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5277 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5278 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5279 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005280elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5281 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005282fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005283if test x$PLATFORM_TRIPLET = x; then
5284 PLATDIR=plat-$MACHDEP
5285else
5286 PLATDIR=plat-$PLATFORM_TRIPLET
5287fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005288
5289
doko@ubuntu.com55532312016-06-14 08:55:19 +02005290if test x$MULTIARCH != x; then
5291 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5292fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005293
5294
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5296$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5297save_LDFLAGS="$LDFLAGS"
5298LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005299
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5301/* end confdefs.h. */
5302
5303int
5304main ()
5305{
5306
5307 ;
5308 return 0;
5309}
5310_ACEOF
5311if ac_fn_c_try_link "$LINENO"; then :
5312 NO_AS_NEEDED="-Wl,--no-as-needed"
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5314$as_echo "yes" >&6; }
5315else
5316 NO_AS_NEEDED=""
5317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
5319fi
5320rm -f core conftest.err conftest.$ac_objext \
5321 conftest$ac_exeext conftest.$ac_ext
5322LDFLAGS="$save_LDFLAGS"
5323
5324
5325
5326# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005327
Matthias Kloseb9621712010-04-24 17:59:49 +00005328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5329$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005330if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005331 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005332else
5333 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5334 then ac_cv_path_EGREP="$GREP -E"
5335 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005336 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005337 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005338 # Loop through the user's path and test for each of PROGNAME-LIST
5339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005340for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5341do
5342 IFS=$as_save_IFS
5343 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005344 for ac_prog in egrep; do
5345 for ac_exec_ext in '' $ac_executable_extensions; do
5346 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005347 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005348# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349 # Check for GNU $ac_path_EGREP
5350case `"$ac_path_EGREP" --version 2>&1` in
5351*GNU*)
5352 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5353*)
5354 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005356 while :
5357 do
5358 cat "conftest.in" "conftest.in" >"conftest.tmp"
5359 mv "conftest.tmp" "conftest.in"
5360 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005361 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005362 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5363 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005365 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5366 # Best one so far, save it but keep looking for a better one
5367 ac_cv_path_EGREP="$ac_path_EGREP"
5368 ac_path_EGREP_max=$ac_count
5369 fi
5370 # 10*(2^10) chars as input seems more than enough
5371 test $ac_count -gt 10 && break
5372 done
5373 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5374esac
5375
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 $ac_path_EGREP_found && break 3
5377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005378 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005379 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005380IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005382 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 +00005383 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384else
5385 ac_cv_path_EGREP=$EGREP
5386fi
5387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 fi
5389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5391$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005393
5394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5396$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005397if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo_n "(cached) " >&6
5399else
5400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005401/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005402#include <stdlib.h>
5403#include <stdarg.h>
5404#include <string.h>
5405#include <float.h>
5406
5407int
5408main ()
5409{
5410
5411 ;
5412 return 0;
5413}
5414_ACEOF
5415if ac_fn_c_try_compile "$LINENO"; then :
5416 ac_cv_header_stdc=yes
5417else
5418 ac_cv_header_stdc=no
5419fi
5420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5421
5422if test $ac_cv_header_stdc = yes; then
5423 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5425/* end confdefs.h. */
5426#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005427
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005428_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005430 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005432else
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005434fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005435rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
Matthias Kloseb9621712010-04-24 17:59:49 +00005437fi
5438
5439if test $ac_cv_header_stdc = yes; then
5440 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5442/* end confdefs.h. */
5443#include <stdlib.h>
5444
5445_ACEOF
5446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5447 $EGREP "free" >/dev/null 2>&1; then :
5448
5449else
5450 ac_cv_header_stdc=no
5451fi
5452rm -f conftest*
5453
5454fi
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5458 if test "$cross_compiling" = yes; then :
5459 :
5460else
5461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5462/* end confdefs.h. */
5463#include <ctype.h>
5464#include <stdlib.h>
5465#if ((' ' & 0x0FF) == 0x020)
5466# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5467# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5468#else
5469# define ISLOWER(c) \
5470 (('a' <= (c) && (c) <= 'i') \
5471 || ('j' <= (c) && (c) <= 'r') \
5472 || ('s' <= (c) && (c) <= 'z'))
5473# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5474#endif
5475
5476#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5477int
5478main ()
5479{
5480 int i;
5481 for (i = 0; i < 256; i++)
5482 if (XOR (islower (i), ISLOWER (i))
5483 || toupper (i) != TOUPPER (i))
5484 return 2;
5485 return 0;
5486}
5487_ACEOF
5488if ac_fn_c_try_run "$LINENO"; then :
5489
5490else
5491 ac_cv_header_stdc=no
5492fi
5493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5494 conftest.$ac_objext conftest.beam conftest.$ac_ext
5495fi
5496
5497fi
5498fi
5499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5500$as_echo "$ac_cv_header_stdc" >&6; }
5501if test $ac_cv_header_stdc = yes; then
5502
5503$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5504
5505fi
5506
5507# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5508for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5509 inttypes.h stdint.h unistd.h
5510do :
5511 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5512ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5513"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005514if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005515 cat >>confdefs.h <<_ACEOF
5516#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5517_ACEOF
5518
5519fi
5520
5521done
5522
5523
5524
5525 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 +02005526if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 MINIX=yes
5528else
5529 MINIX=
5530fi
5531
5532
5533 if test "$MINIX" = yes; then
5534
5535$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5536
5537
5538$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5539
5540
5541$as_echo "#define _MINIX 1" >>confdefs.h
5542
5543 fi
5544
5545
5546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5547$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005548if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 $as_echo_n "(cached) " >&6
5550else
5551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5552/* end confdefs.h. */
5553
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005554# define __EXTENSIONS__ 1
5555 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005556int
5557main ()
5558{
5559
5560 ;
5561 return 0;
5562}
5563_ACEOF
5564if ac_fn_c_try_compile "$LINENO"; then :
5565 ac_cv_safe_to_define___extensions__=yes
5566else
5567 ac_cv_safe_to_define___extensions__=no
5568fi
5569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5570fi
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5572$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5573 test $ac_cv_safe_to_define___extensions__ = yes &&
5574 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5575
5576 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5577
5578 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5579
5580 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5581
5582 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5583
5584
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585
Xavier de Gaye95750b12016-07-09 11:05:42 +02005586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5587$as_echo_n "checking for the Android API level... " >&6; }
5588cat >> conftest.c <<EOF
5589#ifdef __ANDROID__
5590#include <android/api-level.h>
5591__ANDROID_API__
5592#else
5593#error not Android
5594#endif
5595EOF
5596
5597if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5598 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5600$as_echo "$ANDROID_API_LEVEL" >&6; }
5601
5602cat >>confdefs.h <<_ACEOF
5603#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5604_ACEOF
5605
5606else
5607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5608$as_echo "not Android" >&6; }
5609fi
5610rm -f conftest.c conftest.out
5611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612# Check for unsupported systems
5613case $ac_sys_system/$ac_sys_release in
5614atheos*|Linux*/1*)
5615 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5616 echo See README for details.
5617 exit 1;;
5618esac
5619
5620
Matthias Kloseb9621712010-04-24 17:59:49 +00005621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5622$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
5624# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005625if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626 withval=$with_suffix;
5627 case $withval in
5628 no) EXEEXT=;;
5629 yes) EXEEXT=.exe;;
5630 *) EXEEXT=$withval;;
5631 esac
5632fi
5633
Matthias Kloseb9621712010-04-24 17:59:49 +00005634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5635$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636
5637# Test whether we're running on a non-case-sensitive system, in which
5638# case we give a warning if no ext is given
5639
Matthias Kloseb9621712010-04-24 17:59:49 +00005640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5641$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642if test ! -d CaseSensitiveTestDir; then
5643mkdir CaseSensitiveTestDir
5644fi
5645
5646if test -d casesensitivetestdir
5647then
Matthias Kloseb9621712010-04-24 17:59:49 +00005648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5649$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650 BUILDEXEEXT=.exe
5651else
Matthias Kloseb9621712010-04-24 17:59:49 +00005652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5653$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654 BUILDEXEEXT=$EXEEXT
5655fi
5656rmdir CaseSensitiveTestDir
5657
5658case $MACHDEP in
5659bsdos*)
5660 case $CC in
5661 gcc) CC="$CC -D_HAVE_BSDI";;
5662 esac;;
5663esac
5664
5665case $ac_sys_system in
5666hp*|HP*)
5667 case $CC in
5668 cc|*/cc) CC="$CC -Ae";;
5669 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670esac
5671
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5674$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675if test -z "$LIBRARY"
5676then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005677 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5680$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681
5682# LDLIBRARY is the name of the library to link against (as opposed to the
5683# name of the library into which to insert object files). BLDLIBRARY is also
5684# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5685# is blank as the main program is not linked directly against LDLIBRARY.
5686# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5687# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5688# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5689# DLLLIBRARY is the shared (i.e., DLL) library.
5690#
5691# RUNSHARED is used to run shared python without installed libraries
5692#
5693# INSTSONAME is the name of the shared library that will be use to install
5694# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005695#
5696# LDVERSION is the shared library version number, normally the Python version
5697# with the ABI build flags appended.
5698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
5700
5701
5702
5703
5704
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706LDLIBRARY="$LIBRARY"
5707BLDLIBRARY='$(LDLIBRARY)'
5708INSTSONAME='$(LDLIBRARY)'
5709DLLLIBRARY=''
5710LDLIBRARYDIR=''
5711RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005712LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# LINKCC is the command that links the python executable -- default is $(CC).
5715# If CXX is set, and if it is needed to link a main function that was
5716# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5717# python might then depend on the C++ runtime
5718# This is altered for AIX in order to build the export list before
5719# linking.
5720
Matthias Kloseb9621712010-04-24 17:59:49 +00005721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5722$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723if test -z "$LINKCC"
5724then
5725 LINKCC='$(PURIFY) $(MAINCC)'
5726 case $ac_sys_system in
5727 AIX*)
5728 exp_extra="\"\""
5729 if test $ac_sys_release -ge 5 -o \
5730 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5731 exp_extra="."
5732 fi
5733 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734 QNX*)
5735 # qcc must be used because the other compilers do not
5736 # support -N.
5737 LINKCC=qcc;;
5738 esac
5739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5741$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
5743# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5744# make sure we default having it set to "no": this is used by
5745# distutils.unixccompiler to know if it should add --enable-new-dtags
5746# to linker command lines, and failing to detect GNU ld simply results
5747# in the same bahaviour as before.
5748
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5750$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751ac_prog=ld
5752if test "$GCC" = yes; then
5753 ac_prog=`$CC -print-prog-name=ld`
5754fi
5755case `"$ac_prog" -V 2>&1 < /dev/null` in
5756 *GNU*)
5757 GNULD=yes;;
5758 *)
5759 GNULD=no;;
5760esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5762$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5765$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005766if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005767 $as_echo_n "(cached) " >&6
5768else
5769 ac_cv_c_inline=no
5770for ac_kw in inline __inline__ __inline; do
5771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5772/* end confdefs.h. */
5773#ifndef __cplusplus
5774typedef int foo_t;
5775static $ac_kw foo_t static_foo () {return 0; }
5776$ac_kw foo_t foo () {return 0; }
5777#endif
5778
5779_ACEOF
5780if ac_fn_c_try_compile "$LINENO"; then :
5781 ac_cv_c_inline=$ac_kw
5782fi
5783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5784 test "$ac_cv_c_inline" != no && break
5785done
5786
5787fi
5788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5789$as_echo "$ac_cv_c_inline" >&6; }
5790
5791case $ac_cv_c_inline in
5792 inline | yes) ;;
5793 *)
5794 case $ac_cv_c_inline in
5795 no) ac_val=;;
5796 *) ac_val=$ac_cv_c_inline;;
5797 esac
5798 cat >>confdefs.h <<_ACEOF
5799#ifndef __cplusplus
5800#define inline $ac_val
5801#endif
5802_ACEOF
5803 ;;
5804esac
5805
5806if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005807
5808$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005809
5810
5811fi
5812
5813
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5815$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005817if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 enableval=$enable_shared;
5819fi
5820
5821
5822if test -z "$enable_shared"
5823then
5824 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005825 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826 enable_shared="yes";;
5827 *)
5828 enable_shared="no";;
5829 esac
5830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5832$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5835$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005837if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005838 enableval=$enable_profiling;
5839fi
5840
5841if test "x$enable_profiling" = xyes; then
5842 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005843 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845/* end confdefs.h. */
5846int main() { return 0; }
5847_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005848if ac_fn_c_try_link "$LINENO"; then :
5849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005851 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005853rm -f core conftest.err conftest.$ac_objext \
5854 conftest$ac_exeext conftest.$ac_ext
5855 CC="$ac_save_cc"
5856else
5857 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5860$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861
doko@ubuntu.comba015832012-06-30 16:52:05 +02005862if test "x$enable_profiling" = xyes; then
5863 BASECFLAGS="-pg $BASECFLAGS"
5864 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865fi
5866
Matthias Kloseb9621712010-04-24 17:59:49 +00005867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5868$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869
5870# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5871# library that we build, but we do not want to link against it (we
5872# will find it with a -framework option). For this reason there is an
5873# extra variable BLDLIBRARY against which Python and the extension
5874# modules are linked, BLDLIBRARY. This is normally the same as
5875# LDLIBRARY, but empty for MacOSX framework builds.
5876if test "$enable_framework"
5877then
5878 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005879 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 BLDLIBRARY=''
5881else
5882 BLDLIBRARY='$(LDLIBRARY)'
5883fi
5884
5885# Other platforms follow
5886if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005887 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888
Matthias Kloseb9621712010-04-24 17:59:49 +00005889$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890
5891 case $ac_sys_system in
5892 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005893 LDLIBRARY='libpython$(LDVERSION).dll.a'
5894 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 ;;
5896 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005897 LDLIBRARY='libpython$(LDVERSION).so'
5898 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005899 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005901 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005902 then
5903 PY3LIBRARY=libpython3.so
5904 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005906 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005907 LDLIBRARY='libpython$(LDVERSION).so'
5908 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005909 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005911 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005912 then
5913 PY3LIBRARY=libpython3.so
5914 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 hp*|HP*)
5917 case `uname -m` in
5918 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005919 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ;;
5921 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
5924 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005929 LDLIBRARY='libpython$(LDVERSION).dylib'
5930 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005931 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005933 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005935 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005936 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937
5938 esac
5939else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005940 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 case $ac_sys_system in
5942 CYGWIN*)
5943 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005944 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
5946 esac
5947fi
5948
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005949if test "$cross_compiling" = yes; then
5950 RUNSHARED=
5951fi
5952
Matthias Kloseb9621712010-04-24 17:59:49 +00005953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5954$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955
5956if test -n "$ac_tool_prefix"; then
5957 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5958set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5960$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005961if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963else
5964 if test -n "$RANLIB"; then
5965 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5966else
5967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5968for as_dir in $PATH
5969do
5970 IFS=$as_save_IFS
5971 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 break 2
5977 fi
5978done
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980IFS=$as_save_IFS
5981
5982fi
5983fi
5984RANLIB=$ac_cv_prog_RANLIB
5985if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5987$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988else
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991fi
5992
5993
5994fi
5995if test -z "$ac_cv_prog_RANLIB"; then
5996 ac_ct_RANLIB=$RANLIB
5997 # Extract the first word of "ranlib", so it can be a program name with args.
5998set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006001if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003else
6004 if test -n "$ac_ct_RANLIB"; then
6005 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6006else
6007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010 IFS=$as_save_IFS
6011 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006012 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016 break 2
6017 fi
6018done
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020IFS=$as_save_IFS
6021
6022fi
6023fi
6024ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6025if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6027$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028else
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031fi
6032
6033 if test "x$ac_ct_RANLIB" = x; then
6034 RANLIB=":"
6035 else
6036 case $cross_compiling:$ac_tool_warned in
6037yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040ac_tool_warned=yes ;;
6041esac
6042 RANLIB=$ac_ct_RANLIB
6043 fi
6044else
6045 RANLIB="$ac_cv_prog_RANLIB"
6046fi
6047
6048
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006049if test -n "$ac_tool_prefix"; then
6050 for ac_prog in ar aal
6051 do
6052 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6053set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6055$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006056if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058else
6059 if test -n "$AR"; then
6060 ac_cv_prog_AR="$AR" # Let the user override the test.
6061else
6062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063for as_dir in $PATH
6064do
6065 IFS=$as_save_IFS
6066 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006069 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071 break 2
6072 fi
6073done
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075IFS=$as_save_IFS
6076
6077fi
6078fi
6079AR=$ac_cv_prog_AR
6080if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6082$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083else
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6085$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086fi
6087
6088
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006089 test -n "$AR" && break
6090 done
6091fi
6092if test -z "$AR"; then
6093 ac_ct_AR=$AR
6094 for ac_prog in ar aal
6095do
6096 # Extract the first word of "$ac_prog", so it can be a program name with args.
6097set dummy $ac_prog; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_prog_ac_ct_AR+:} false; then :
6101 $as_echo_n "(cached) " >&6
6102else
6103 if test -n "$ac_ct_AR"; then
6104 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6105else
6106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109 IFS=$as_save_IFS
6110 test -z "$as_dir" && as_dir=.
6111 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006113 ac_cv_prog_ac_ct_AR="$ac_prog"
6114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115 break 2
6116 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006118 done
6119IFS=$as_save_IFS
6120
6121fi
6122fi
6123ac_ct_AR=$ac_cv_prog_ac_ct_AR
6124if test -n "$ac_ct_AR"; then
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6126$as_echo "$ac_ct_AR" >&6; }
6127else
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
6131
6132
6133 test -n "$ac_ct_AR" && break
6134done
6135
6136 if test "x$ac_ct_AR" = x; then
6137 AR="ar"
6138 else
6139 case $cross_compiling:$ac_tool_warned in
6140yes:)
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6142$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6143ac_tool_warned=yes ;;
6144esac
6145 AR=$ac_ct_AR
6146 fi
6147fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148
6149
6150# tweak ARFLAGS only if the user didn't set it on the command line
6151
6152if test -z "$ARFLAGS"
6153then
6154 ARFLAGS="rc"
6155fi
6156
doko@ubuntu.com58844492012-06-30 18:25:32 +02006157if test -n "$ac_tool_prefix"; then
6158 for ac_prog in readelf
6159 do
6160 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6161set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_prog_READELF+:} false; then :
6165 $as_echo_n "(cached) " >&6
6166else
6167 if test -n "$READELF"; then
6168 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6169else
6170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171for as_dir in $PATH
6172do
6173 IFS=$as_save_IFS
6174 test -z "$as_dir" && as_dir=.
6175 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006176 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006177 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6179 break 2
6180 fi
6181done
6182 done
6183IFS=$as_save_IFS
6184
6185fi
6186fi
6187READELF=$ac_cv_prog_READELF
6188if test -n "$READELF"; then
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6190$as_echo "$READELF" >&6; }
6191else
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194fi
6195
6196
6197 test -n "$READELF" && break
6198 done
6199fi
6200if test -z "$READELF"; then
6201 ac_ct_READELF=$READELF
6202 for ac_prog in readelf
6203do
6204 # Extract the first word of "$ac_prog", so it can be a program name with args.
6205set dummy $ac_prog; ac_word=$2
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6207$as_echo_n "checking for $ac_word... " >&6; }
6208if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6209 $as_echo_n "(cached) " >&6
6210else
6211 if test -n "$ac_ct_READELF"; then
6212 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6213else
6214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6215for as_dir in $PATH
6216do
6217 IFS=$as_save_IFS
6218 test -z "$as_dir" && as_dir=.
6219 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006220 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006221 ac_cv_prog_ac_ct_READELF="$ac_prog"
6222 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6223 break 2
6224 fi
6225done
6226 done
6227IFS=$as_save_IFS
6228
6229fi
6230fi
6231ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6232if test -n "$ac_ct_READELF"; then
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6234$as_echo "$ac_ct_READELF" >&6; }
6235else
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6237$as_echo "no" >&6; }
6238fi
6239
6240
6241 test -n "$ac_ct_READELF" && break
6242done
6243
6244 if test "x$ac_ct_READELF" = x; then
6245 READELF=":"
6246 else
6247 case $cross_compiling:$ac_tool_warned in
6248yes:)
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6250$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6251ac_tool_warned=yes ;;
6252esac
6253 READELF=$ac_ct_READELF
6254 fi
6255fi
6256
6257if test "$cross_compiling" = yes; then
6258 case "$READELF" in
6259 readelf|:)
6260 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6261 ;;
6262 esac
6263fi
6264
6265
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267case $MACHDEP in
6268bsdos*|hp*|HP*)
6269 # install -d does not work on BSDI or HP-UX
6270 if test -z "$INSTALL"
6271 then
6272 INSTALL="${srcdir}/install-sh -c"
6273 fi
6274esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275# Find a good install program. We prefer a C program (faster),
6276# so one script is as good as another. But avoid the broken or
6277# incompatible versions:
6278# SysV /etc/install, /usr/sbin/install
6279# SunOS /usr/etc/install
6280# IRIX /sbin/install
6281# AIX /bin/install
6282# AmigaOS /C/install, which installs bootblocks on floppy discs
6283# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6284# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6285# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6286# OS/2's system install, which has a completely different semantic
6287# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006288# Reject install programs that cannot install multiple files.
6289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6290$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006292if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006293 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294else
6295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6296for as_dir in $PATH
6297do
6298 IFS=$as_save_IFS
6299 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006300 # Account for people who put trailing slashes in PATH elements.
6301case $as_dir/ in #((
6302 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006304 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305 /usr/ucb/* ) ;;
6306 *)
6307 # OSF1 and SCO ODT 3.0 have their own names for install.
6308 # Don't use installbsd from OSF since it installs stuff as root
6309 # by default.
6310 for ac_prog in ginstall scoinst install; do
6311 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006312 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313 if test $ac_prog = install &&
6314 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6315 # AIX install. It has an incompatible calling convention.
6316 :
6317 elif test $ac_prog = install &&
6318 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6319 # program-specific install script used by HP pwplus--don't use.
6320 :
6321 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 rm -rf conftest.one conftest.two conftest.dir
6323 echo one > conftest.one
6324 echo two > conftest.two
6325 mkdir conftest.dir
6326 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6327 test -s conftest.one && test -s conftest.two &&
6328 test -s conftest.dir/conftest.one &&
6329 test -s conftest.dir/conftest.two
6330 then
6331 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6332 break 3
6333 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334 fi
6335 fi
6336 done
6337 done
6338 ;;
6339esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006340
6341 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342IFS=$as_save_IFS
6343
Matthias Kloseb9621712010-04-24 17:59:49 +00006344rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345
6346fi
6347 if test "${ac_cv_path_install+set}" = set; then
6348 INSTALL=$ac_cv_path_install
6349 else
6350 # As a last resort, use the slow shell script. Don't cache a
6351 # value for INSTALL within a source directory, because that will
6352 # break other packages using the cache if that directory is
6353 # removed, or if the value is a relative name.
6354 INSTALL=$ac_install_sh
6355 fi
6356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6358$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359
6360# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6361# It thinks the first close brace ends the variable substitution.
6362test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6363
6364test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6365
6366test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6367
Matthias Klose93a0ef12012-03-15 18:08:34 +01006368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6369$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6370if test -z "$MKDIR_P"; then
6371 if ${ac_cv_path_mkdir+:} false; then :
6372 $as_echo_n "(cached) " >&6
6373else
6374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6375for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6376do
6377 IFS=$as_save_IFS
6378 test -z "$as_dir" && as_dir=.
6379 for ac_prog in mkdir gmkdir; do
6380 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006381 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006382 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6383 'mkdir (GNU coreutils) '* | \
6384 'mkdir (coreutils) '* | \
6385 'mkdir (fileutils) '4.1*)
6386 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6387 break 3;;
6388 esac
6389 done
6390 done
6391 done
6392IFS=$as_save_IFS
6393
6394fi
6395
6396 test -d ./--version && rmdir ./--version
6397 if test "${ac_cv_path_mkdir+set}" = set; then
6398 MKDIR_P="$ac_cv_path_mkdir -p"
6399 else
6400 # As a last resort, use the slow shell script. Don't cache a
6401 # value for MKDIR_P within a source directory, because that will
6402 # break other packages using the cache if that directory is
6403 # removed, or if the value is a relative name.
6404 MKDIR_P="$ac_install_sh -d"
6405 fi
6406fi
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6408$as_echo "$MKDIR_P" >&6; }
6409
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410
6411# Not every filesystem supports hard links
6412
6413if test -z "$LN" ; then
6414 case $ac_sys_system in
6415 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416 *) LN=ln;;
6417 esac
6418fi
6419
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006420# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006421
6422ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006423
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6426$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427
6428# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006429if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430 withval=$with_pydebug;
6431if test "$withval" != no
6432then
6433
Matthias Kloseb9621712010-04-24 17:59:49 +00006434$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435
Matthias Kloseb9621712010-04-24 17:59:49 +00006436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6437$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006439 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006440else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442fi
6443else
Matthias Kloseb9621712010-04-24 17:59:49 +00006444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6445$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446fi
6447
6448
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006449# Enable LTO flags
6450
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6452$as_echo_n "checking for --with-lto... " >&6; }
6453
6454# Check whether --with-lto was given.
6455if test "${with_lto+set}" = set; then :
6456 withval=$with_lto;
6457if test "$withval" != no
6458then
6459 Py_LTO='true'
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6461$as_echo "yes" >&6; };
6462else
6463 Py_LTO='false'
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465$as_echo "no" >&6; };
6466fi
6467else
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469$as_echo "no" >&6; }
6470fi
6471
6472if test "$Py_LTO" = 'true' ; then
6473 case $CC in
6474 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006475 case $ac_sys_system in
6476 Darwin*)
6477 # Any changes made here should be reflected in the GCC+Darwin case below
6478 LTOFLAGS="-flto -Wl,-export_dynamic"
6479 ;;
6480 *)
6481 LTOFLAGS="-flto"
6482 ;;
6483 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006484 ;;
6485 *gcc*)
6486 case $ac_sys_system in
6487 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006488 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006489 ;;
6490 *)
6491 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6492 ;;
6493 esac
6494 ;;
6495 esac
6496fi
6497
Brett Cannon7188a3e2015-09-18 15:13:44 -07006498# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006499
6500
6501
6502
6503
6504
Brett Cannon7188a3e2015-09-18 15:13:44 -07006505# Extract the first word of "llvm-profdata", so it can be a program name with args.
6506set dummy llvm-profdata; ac_word=$2
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6508$as_echo_n "checking for $ac_word... " >&6; }
6509if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6510 $as_echo_n "(cached) " >&6
6511else
6512 if test -n "$LLVM_PROF_FOUND"; then
6513 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6514else
6515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516for as_dir in $PATH
6517do
6518 IFS=$as_save_IFS
6519 test -z "$as_dir" && as_dir=.
6520 for ac_exec_ext in '' $ac_executable_extensions; do
6521 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522 ac_cv_prog_LLVM_PROF_FOUND="found"
6523 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524 break 2
6525 fi
6526done
6527 done
6528IFS=$as_save_IFS
6529
6530 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6531fi
6532fi
6533LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6534if test -n "$LLVM_PROF_FOUND"; then
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6536$as_echo "$LLVM_PROF_FOUND" >&6; }
6537else
6538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539$as_echo "no" >&6; }
6540fi
6541
6542
6543LLVM_PROF_ERR=no
6544case $CC in
6545 *clang*)
6546 # Any changes made here should be reflected in the GCC+Darwin case below
6547 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6548 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6549 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6550 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6551 if test $LLVM_PROF_FOUND = not-found
6552 then
6553 LLVM_PROF_ERR=yes
6554 fi
6555 ;;
6556 *gcc*)
6557 case $ac_sys_system in
6558 Darwin*)
6559 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6560 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6561 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6562 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6563 if test $LLVM_PROF_FOUND = not-found
6564 then
6565 LLVM_PROF_ERR=yes
6566 fi
6567 ;;
6568 *)
6569 PGO_PROF_GEN_FLAG="-fprofile-generate"
6570 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6571 LLVM_PROF_MERGER="true"
6572 LLVM_PROF_FILE=""
6573 ;;
6574 esac
6575 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006576 *icc*)
6577 PGO_PROF_GEN_FLAG="-prof-gen"
6578 PGO_PROF_USE_FLAG="-prof-use"
6579 LLVM_PROF_MERGER="true"
6580 LLVM_PROF_FILE=""
6581 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006582esac
6583
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6585# merged with this chunk of code?
6586
6587# Optimizer/debugger flags
6588# ------------------------
6589# (The following bit of code is complicated enough - please keep things
6590# indented properly. Just pretend you're editing Python code. ;-)
6591
6592# There are two parallel sets of case statements below, one that checks to
6593# see if OPT was set and one that does BASECFLAGS setting based upon
6594# compiler and platform. BASECFLAGS tweaks need to be made even if the
6595# user set OPT.
6596
6597# tweak OPT based on compiler and platform, only if the user didn't set
6598# it on the command line
6599
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006600if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601then
6602 case $GCC in
6603 yes)
6604 if test "$CC" != 'g++' ; then
6605 STRICT_PROTO="-Wstrict-prototypes"
6606 fi
6607 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6608 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6609 WRAP="-fwrapv"
6610 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006611
6612 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006613 case $CC in
6614 *clang*) WRAP="-fwrapv"
6615 ;;
6616 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618 case $ac_cv_prog_cc_g in
6619 yes)
6620 if test "$Py_DEBUG" = 'true' ; then
6621 # Optimization messes up debuggers, so turn it off for
6622 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006623 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6624 OPT="-g -Og -Wall $STRICT_PROTO"
6625 else
6626 OPT="-g -O0 -Wall $STRICT_PROTO"
6627 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006628 else
6629 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6630 fi
6631 ;;
6632 *)
6633 OPT="-O3 -Wall $STRICT_PROTO"
6634 ;;
6635 esac
6636 case $ac_sys_system in
6637 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6638 ;;
6639 esac
6640 ;;
6641
6642 *)
6643 OPT="-O"
6644 ;;
6645 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006646fi
6647
6648
6649
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651# The -arch flags for universal builds on OSX
6652UNIVERSAL_ARCH_FLAGS=
6653
6654
6655# tweak BASECFLAGS based on compiler and platform
6656case $GCC in
6657yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006658 # Python doesn't violate C99 aliasing rules, but older versions of
6659 # GCC produce warnings for legal Python code. Enable
6660 # -fno-strict-aliasing on versions of GCC that support but produce
6661 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6663$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664 ac_save_cc="$CC"
6665 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006666 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006667 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006668 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006669else
Matthias Kloseb9621712010-04-24 17:59:49 +00006670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006671/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006672
Matthias Kloseb159a552010-04-25 21:00:44 +00006673
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006674int
6675main ()
6676{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006677
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006678 ;
6679 return 0;
6680}
Matthias Kloseb159a552010-04-25 21:00:44 +00006681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006683if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006684
6685 CC="$ac_save_cc -fstrict-aliasing"
6686 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006688/* end confdefs.h. */
6689
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006690 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006691int
6692main ()
6693{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006694double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006695 ;
6696 return 0;
6697}
Matthias Kloseb159a552010-04-25 21:00:44 +00006698
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006700if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006701
6702 ac_cv_no_strict_aliasing=no
6703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006704else
Matthias Kloseb159a552010-04-25 21:00:44 +00006705
6706 ac_cv_no_strict_aliasing=yes
6707
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006708fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006710
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006711else
Matthias Kloseb159a552010-04-25 21:00:44 +00006712
6713 ac_cv_no_strict_aliasing=no
6714
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006715fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006717fi
6718
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006719 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6722$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006723 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724 then
6725 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6726 fi
6727
Zachary Ware5af85642015-12-21 12:09:17 -06006728 # ICC doesn't recognize the option, but only emits a warning
6729 ## XXX does it emit an unused result warning and can it be disabled?
6730 case "$CC" in
6731 *icc*)
6732 ac_cv_disable_unused_result_warning=no
6733 ;;
6734 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6736$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6737 ac_save_cc="$CC"
6738 CC="$CC -Wunused-result -Werror"
6739 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006740 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006741 $as_echo_n "(cached) " >&6
6742else
6743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6744/* end confdefs.h. */
6745
6746
6747int
6748main ()
6749{
6750
6751 ;
6752 return 0;
6753}
6754
6755_ACEOF
6756if ac_fn_c_try_compile "$LINENO"; then :
6757
6758 ac_cv_disable_unused_result_warning=yes
6759
6760else
6761
6762 ac_cv_disable_unused_result_warning=no
6763
6764fi
6765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6766fi
6767
6768 CFLAGS="$save_CFLAGS"
6769 CC="$ac_save_cc"
6770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6771$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006772 ;;
6773 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006774
6775 if test $ac_cv_disable_unused_result_warning = yes
6776 then
6777 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6778 fi
6779
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6781$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6782 ac_save_cc="$CC"
6783 CC="$CC -Werror=declaration-after-statement"
6784 save_CFLAGS="$CFLAGS"
6785 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6786 $as_echo_n "(cached) " >&6
6787else
6788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6789/* end confdefs.h. */
6790
6791
6792int
6793main ()
6794{
6795
6796 ;
6797 return 0;
6798}
6799
6800_ACEOF
6801if ac_fn_c_try_compile "$LINENO"; then :
6802
6803 ac_cv_declaration_after_statement_warning=yes
6804
6805else
6806
6807 ac_cv_declaration_after_statement_warning=no
6808
6809fi
6810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6811fi
6812
6813 CFLAGS="$save_CFLAGS"
6814 CC="$ac_save_cc"
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6816$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6817
6818 if test $ac_cv_declaration_after_statement_warning = yes
6819 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006820 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006821 fi
6822
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6824$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6825 ac_save_cc="$CC"
6826 CC="$CC -Wsign-compare"
6827 save_CFLAGS="$CFLAGS"
6828 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6829 $as_echo_n "(cached) " >&6
6830else
6831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6832/* end confdefs.h. */
6833
6834
6835int
6836main ()
6837{
6838
6839 ;
6840 return 0;
6841}
6842
6843_ACEOF
6844if ac_fn_c_try_compile "$LINENO"; then :
6845
6846 ac_cv_enable_sign_compare_warning=yes
6847
6848else
6849
6850 ac_cv_enable_sign_compare_warning=no
6851
6852fi
6853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6854fi
6855
6856 CFLAGS="$save_CFLAGS"
6857 CC="$ac_save_cc"
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6859$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6860
6861 if test $ac_cv_enable_sign_compare_warning = yes
6862 then
6863 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6864 fi
6865
6866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6867$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6868 ac_save_cc="$CC"
6869 CC="$CC -Wunreachable-code"
6870 save_CFLAGS="$CFLAGS"
6871 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6872 $as_echo_n "(cached) " >&6
6873else
6874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875/* end confdefs.h. */
6876
6877
6878int
6879main ()
6880{
6881
6882 ;
6883 return 0;
6884}
6885
6886_ACEOF
6887if ac_fn_c_try_compile "$LINENO"; then :
6888
6889 ac_cv_enable_unreachable_code_warning=yes
6890
6891else
6892
6893 ac_cv_enable_unreachable_code_warning=no
6894
6895fi
6896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6897fi
6898
6899 CFLAGS="$save_CFLAGS"
6900 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006901
6902 # Don't enable unreachable code warning in debug mode, since it usually
6903 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006904 # Issue #24324: Unfortunately, the unreachable code warning does not work
6905 # correctly on gcc and has been silently removed from the compiler.
6906 # It is supported on clang but on OS X systems gcc may be an alias
6907 # for clang. Try to determine if the compiler is not really gcc and,
6908 # if so, only then enable the warning.
6909 if test $ac_cv_enable_unreachable_code_warning = yes && \
6910 test "$Py_DEBUG" != "true" && \
6911 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006912 then
6913 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006914 else
6915 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006916 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6918$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006919
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6921 # support. Without this, treatment of subnormals doesn't follow
6922 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006923 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924 alpha*)
6925 BASECFLAGS="$BASECFLAGS -mieee"
6926 ;;
6927 esac
6928
6929 case $ac_sys_system in
6930 SCO_SV*)
6931 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6932 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006933
6934 # is there any other compiler on Darwin besides gcc?
6935 Darwin*)
6936 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6937 # used to be here, but non-Apple gcc doesn't accept them.
6938 if test "${CC}" = gcc
6939 then
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006941$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006942 case "${UNIVERSALSDK}" in
6943 */MacOSX10.4u.sdk)
6944 # Build using 10.4 SDK, force usage of gcc when the
6945 # compiler is gcc, otherwise the user will get very
6946 # confusing error messages when building on OSX 10.6
6947 CC=gcc-4.0
6948 CPP=cpp-4.0
6949 ;;
6950 esac
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006952$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006953 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006954
Ned Deily87adb6e2013-10-18 21:09:56 -07006955 if test "${enable_universalsdk}"
6956 then
6957 case "$UNIVERSAL_ARCHS" in
6958 32-bit)
6959 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6960 LIPO_32BIT_FLAGS=""
6961 ARCH_RUN_32BIT=""
6962 ;;
6963 64-bit)
6964 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6965 LIPO_32BIT_FLAGS=""
6966 ARCH_RUN_32BIT="true"
6967 ;;
6968 all)
6969 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6970 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6971 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6972 ;;
6973 intel)
6974 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6975 LIPO_32BIT_FLAGS="-extract i386"
6976 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6977 ;;
6978 intel-32)
6979 UNIVERSAL_ARCH_FLAGS="-arch i386"
6980 LIPO_32BIT_FLAGS=""
6981 ARCH_RUN_32BIT=""
6982 ;;
6983 3-way)
6984 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6985 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6986 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6987 ;;
6988 *)
6989 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6990 ;;
6991 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006992
Ned Deily87adb6e2013-10-18 21:09:56 -07006993 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6994 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6995 if test "${UNIVERSALSDK}" != "/"
6996 then
6997 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6998 fi
6999 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000
Ned Deily87adb6e2013-10-18 21:09:56 -07007001 # Calculate an appropriate deployment target for this build:
7002 # The deployment target value is used explicitly to enable certain
7003 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007004 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007005 # component of the string returned by distutils.get_platform().
7006 #
7007 # Use the value from:
7008 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7009 # 2. the operating system version of the build machine if >= 10.6
7010 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7011 # below to pick either 10.3, 10.4, or 10.5 as the target.
7012 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013
Ned Deily87adb6e2013-10-18 21:09:56 -07007014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7015$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007016 cur_target_major=`sw_vers -productVersion | \
7017 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7018 cur_target_minor=`sw_vers -productVersion | \
7019 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7020 cur_target="${cur_target_major}.${cur_target_minor}"
7021 if test ${cur_target_major} -eq 10 && \
7022 test ${cur_target_minor} -ge 3 && \
7023 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007024 then
Ned Deily36820b62014-06-25 13:44:22 -07007025 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007026 cur_target=10.3
7027 if test ${enable_universalsdk}
7028 then
7029 case "$UNIVERSAL_ARCHS" in
7030 all|3-way|intel|64-bit)
7031 # These configurations were first supported in 10.5
7032 cur_target='10.5'
7033 ;;
7034 esac
7035 else
7036 if test `/usr/bin/arch` = "i386"
7037 then
7038 # 10.4 was the first release to support Intel archs
7039 cur_target="10.4"
7040 fi
7041 fi
7042 fi
7043 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007044
Ned Deily87adb6e2013-10-18 21:09:56 -07007045 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7046 # environment with a value that is the same as what we'll use
7047 # in the Makefile to ensure that we'll get the same compiler
7048 # environment during configure and build time.
7049 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7050 export MACOSX_DEPLOYMENT_TARGET
7051 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7053$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007054
Ned Deily87adb6e2013-10-18 21:09:56 -07007055 # end of Darwin* tests
7056 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007057 esac
7058 ;;
7059
7060*)
7061 case $ac_sys_system in
7062 OpenUNIX*|UnixWare*)
7063 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7064 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065 SCO_SV*)
7066 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7067 ;;
7068 esac
7069 ;;
7070esac
7071
Zachary Ware5af85642015-12-21 12:09:17 -06007072# ICC needs -fp-model strict or floats behave badly
7073case "$CC" in
7074*icc*)
7075 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7076 ;;
7077esac
7078
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007079if test "$Py_DEBUG" = 'true'; then
7080 :
7081else
7082 OPT="-DNDEBUG $OPT"
7083fi
7084
7085if test "$ac_arch_flags"
7086then
7087 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7088fi
7089
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007090# On some compilers, pthreads are available without further options
7091# (e.g. MacOS X). On some of these systems, the compiler will not
7092# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7093# So we have to see first whether pthreads are available without
7094# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7096$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007097if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007098 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007099else
Matthias Kloseb9621712010-04-24 17:59:49 +00007100 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007101 ac_cv_pthread_is_default=no
7102else
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007104/* end confdefs.h. */
7105
Stefan Krah7dba5942012-11-22 22:49:11 +01007106#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007107#include <pthread.h>
7108
7109void* routine(void* p){return NULL;}
7110
7111int main(){
7112 pthread_t p;
7113 if(pthread_create(&p,NULL,routine,NULL)!=0)
7114 return 1;
7115 (void)pthread_detach(p);
7116 return 0;
7117}
7118
7119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007120if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007121
7122 ac_cv_pthread_is_default=yes
7123 ac_cv_kthread=no
7124 ac_cv_pthread=no
7125
7126else
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007131fi
7132
7133
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007134fi
7135
Matthias Kloseb9621712010-04-24 17:59:49 +00007136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7137$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007138
7139
7140if test $ac_cv_pthread_is_default = yes
7141then
7142 ac_cv_kpthread=no
7143else
7144# -Kpthread, if available, provides the right #defines
7145# and linker options to make pthread_create available
7146# Some compilers won't report that they do not support -Kpthread,
7147# so we need to run a program to see whether it really made the
7148# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7150$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007151if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007152 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007153else
7154 ac_save_cc="$CC"
7155CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007156if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007157 ac_cv_kpthread=no
7158else
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007160/* end confdefs.h. */
7161
Stefan Krah7dba5942012-11-22 22:49:11 +01007162#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007163#include <pthread.h>
7164
7165void* routine(void* p){return NULL;}
7166
7167int main(){
7168 pthread_t p;
7169 if(pthread_create(&p,NULL,routine,NULL)!=0)
7170 return 1;
7171 (void)pthread_detach(p);
7172 return 0;
7173}
7174
7175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007176if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007177 ac_cv_kpthread=yes
7178else
Matthias Kloseb9621712010-04-24 17:59:49 +00007179 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7182 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007183fi
7184
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007185CC="$ac_save_cc"
7186fi
7187
Matthias Kloseb9621712010-04-24 17:59:49 +00007188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7189$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190fi
7191
7192if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7193then
7194# -Kthread, if available, provides the right #defines
7195# and linker options to make pthread_create available
7196# Some compilers won't report that they do not support -Kthread,
7197# so we need to run a program to see whether it really made the
7198# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7200$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007201if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007202 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007203else
7204 ac_save_cc="$CC"
7205CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007206if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007207 ac_cv_kthread=no
7208else
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007210/* end confdefs.h. */
7211
Stefan Krah7dba5942012-11-22 22:49:11 +01007212#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007213#include <pthread.h>
7214
7215void* routine(void* p){return NULL;}
7216
7217int main(){
7218 pthread_t p;
7219 if(pthread_create(&p,NULL,routine,NULL)!=0)
7220 return 1;
7221 (void)pthread_detach(p);
7222 return 0;
7223}
7224
7225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007226if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007227 ac_cv_kthread=yes
7228else
Matthias Kloseb9621712010-04-24 17:59:49 +00007229 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007233fi
7234
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007235CC="$ac_save_cc"
7236fi
7237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7239$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240fi
7241
7242if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7243then
7244# -pthread, if available, provides the right #defines
7245# and linker options to make pthread_create available
7246# Some compilers won't report that they do not support -pthread,
7247# so we need to run a program to see whether it really made the
7248# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7250$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007251if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007253else
7254 ac_save_cc="$CC"
7255CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007256if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007257 ac_cv_pthread=no
7258else
Matthias Kloseb9621712010-04-24 17:59:49 +00007259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260/* end confdefs.h. */
7261
Stefan Krah7dba5942012-11-22 22:49:11 +01007262#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263#include <pthread.h>
7264
7265void* routine(void* p){return NULL;}
7266
7267int main(){
7268 pthread_t p;
7269 if(pthread_create(&p,NULL,routine,NULL)!=0)
7270 return 1;
7271 (void)pthread_detach(p);
7272 return 0;
7273}
7274
7275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007276if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007277 ac_cv_pthread=yes
7278else
Matthias Kloseb9621712010-04-24 17:59:49 +00007279 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7282 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007283fi
7284
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007285CC="$ac_save_cc"
7286fi
7287
Matthias Kloseb9621712010-04-24 17:59:49 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7289$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290fi
7291
7292# If we have set a CC compiler flag for thread support then
7293# check if it works for CXX, too.
7294ac_cv_cxx_thread=no
7295if test ! -z "$CXX"
7296then
Matthias Kloseb9621712010-04-24 17:59:49 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7298$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007299ac_save_cxx="$CXX"
7300
7301if test "$ac_cv_kpthread" = "yes"
7302then
7303 CXX="$CXX -Kpthread"
7304 ac_cv_cxx_thread=yes
7305elif test "$ac_cv_kthread" = "yes"
7306then
7307 CXX="$CXX -Kthread"
7308 ac_cv_cxx_thread=yes
7309elif test "$ac_cv_pthread" = "yes"
7310then
7311 CXX="$CXX -pthread"
7312 ac_cv_cxx_thread=yes
7313fi
7314
7315if test $ac_cv_cxx_thread = yes
7316then
7317 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7318 $CXX -c conftest.$ac_ext 2>&5
7319 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7320 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7321 then
7322 ac_cv_cxx_thread=yes
7323 else
7324 ac_cv_cxx_thread=no
7325 fi
7326 rm -fr conftest*
7327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7329$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007330fi
7331CXX="$ac_save_cxx"
7332
7333
7334# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7336$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007337if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341/* end confdefs.h. */
7342#include <stdlib.h>
7343#include <stdarg.h>
7344#include <string.h>
7345#include <float.h>
7346
7347int
7348main ()
7349{
7350
7351 ;
7352 return 0;
7353}
7354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007355if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007356 ac_cv_header_stdc=yes
7357else
Matthias Kloseb9621712010-04-24 17:59:49 +00007358 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007359fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7361
7362if test $ac_cv_header_stdc = yes; then
7363 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365/* end confdefs.h. */
7366#include <string.h>
7367
7368_ACEOF
7369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 $EGREP "memchr" >/dev/null 2>&1; then :
7371
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372else
7373 ac_cv_header_stdc=no
7374fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007375rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376
7377fi
7378
7379if test $ac_cv_header_stdc = yes; then
7380 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007382/* end confdefs.h. */
7383#include <stdlib.h>
7384
7385_ACEOF
7386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 $EGREP "free" >/dev/null 2>&1; then :
7388
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007389else
7390 ac_cv_header_stdc=no
7391fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007392rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393
7394fi
7395
7396if test $ac_cv_header_stdc = yes; then
7397 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399 :
7400else
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402/* end confdefs.h. */
7403#include <ctype.h>
7404#include <stdlib.h>
7405#if ((' ' & 0x0FF) == 0x020)
7406# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7407# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7408#else
7409# define ISLOWER(c) \
7410 (('a' <= (c) && (c) <= 'i') \
7411 || ('j' <= (c) && (c) <= 'r') \
7412 || ('s' <= (c) && (c) <= 'z'))
7413# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7414#endif
7415
7416#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7417int
7418main ()
7419{
7420 int i;
7421 for (i = 0; i < 256; i++)
7422 if (XOR (islower (i), ISLOWER (i))
7423 || toupper (i) != TOUPPER (i))
7424 return 2;
7425 return 0;
7426}
7427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007428if ac_fn_c_try_run "$LINENO"; then :
7429
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430else
Matthias Kloseb9621712010-04-24 17:59:49 +00007431 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7434 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435fi
7436
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437fi
7438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7440$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441if test $ac_cv_header_stdc = yes; then
7442
Matthias Kloseb9621712010-04-24 17:59:49 +00007443$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444
7445fi
7446
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007447for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007448fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007449ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007450sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007451unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007452poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007453sys/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 +01007454sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007455sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007456sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007457sys/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 -07007458libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007459bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007460sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007461do :
7462 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7463ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007464if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007465 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007466#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007467_ACEOF
7468
7469fi
7470
Guido van Rossum627b2d71993-12-24 10:39:16 +00007471done
7472
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007473ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007474for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7477$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007480else
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007482/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007483#include <sys/types.h>
7484#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007485
Martin v. Löwis11437992002-04-12 09:54:03 +00007486int
7487main ()
7488{
7489if ((DIR *) 0)
7490return 0;
7491 ;
7492 return 0;
7493}
7494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007496 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007497else
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007502eval ac_res=\$$as_ac_Header
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7504$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007505if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007506 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007507#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007508_ACEOF
7509
7510ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007511fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007512
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513done
7514# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7515if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7517$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007518if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007519 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520else
Martin v. Löwis11437992002-04-12 09:54:03 +00007521 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007525/* Override any GCC internal prototype to avoid an error.
7526 Use char because int might match the return type of a GCC
7527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007528#ifdef __cplusplus
7529extern "C"
7530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007531char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007532int
7533main ()
7534{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007535return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007536 ;
7537 return 0;
7538}
7539_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007540for ac_lib in '' dir; do
7541 if test -z "$ac_lib"; then
7542 ac_res="none required"
7543 else
7544 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007545 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007546 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007550rm -f core conftest.err conftest.$ac_objext \
7551 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007552 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007553 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007555done
Victor Stinnere0be4232011-10-25 13:06:09 +02007556if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007558else
7559 ac_cv_search_opendir=no
7560fi
7561rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007562LIBS=$ac_func_search_save_LIBS
7563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7565$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007566ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007567if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007568 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007571
Michael W. Hudson54241132001-12-07 15:38:26 +00007572else
Matthias Kloseb9621712010-04-24 17:59:49 +00007573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7574$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007575if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007577else
7578 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582/* Override any GCC internal prototype to avoid an error.
7583 Use char because int might match the return type of a GCC
7584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007585#ifdef __cplusplus
7586extern "C"
7587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007588char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007589int
7590main ()
7591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007592return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007593 ;
7594 return 0;
7595}
7596_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597for ac_lib in '' x; do
7598 if test -z "$ac_lib"; then
7599 ac_res="none required"
7600 else
7601 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007602 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007605 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007607rm -f core conftest.err conftest.$ac_objext \
7608 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007609 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612done
Victor Stinnere0be4232011-10-25 13:06:09 +02007613if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615else
7616 ac_cv_search_opendir=no
7617fi
7618rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007619LIBS=$ac_func_search_save_LIBS
7620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7622$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007624if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007625 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007626
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007627fi
7628
7629fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007630
Matthias Kloseb9621712010-04-24 17:59:49 +00007631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7632$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007633if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007635else
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007637/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007638#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007639int
7640main ()
7641{
7642return makedev(0, 0);
7643 ;
7644 return 0;
7645}
7646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007647if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007648 ac_cv_header_sys_types_h_makedev=yes
7649else
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007652rm -f core conftest.err conftest.$ac_objext \
7653 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007654
7655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7657$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007658
7659if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007660ac_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 +02007661if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007662
Matthias Kloseb9621712010-04-24 17:59:49 +00007663$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007664
7665fi
7666
7667
7668
7669 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 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 +02007671if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007672
Matthias Kloseb9621712010-04-24 17:59:49 +00007673$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007674
7675fi
7676
7677
7678 fi
7679fi
7680
Michael W. Hudson54241132001-12-07 15:38:26 +00007681
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007682# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7683for ac_header in net/if.h
7684do :
7685 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7686#ifdef STDC_HEADERS
7687# include <stdlib.h>
7688# include <stddef.h>
7689#else
7690# ifdef HAVE_STDLIB_H
7691# include <stdlib.h>
7692# endif
7693#endif
7694#ifdef HAVE_SYS_SOCKET_H
7695# include <sys/socket.h>
7696#endif
7697
7698"
Victor Stinnere0be4232011-10-25 13:06:09 +02007699if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007700 cat >>confdefs.h <<_ACEOF
7701#define HAVE_NET_IF_H 1
7702_ACEOF
7703
7704fi
7705
7706done
7707
7708
Martin v. Löwis11017b12006-01-14 18:12:57 +00007709# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007710for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007711do :
7712 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 +00007713#ifdef HAVE_ASM_TYPES_H
7714#include <asm/types.h>
7715#endif
7716#ifdef HAVE_SYS_SOCKET_H
7717#include <sys/socket.h>
7718#endif
7719
Matthias Kloseb9621712010-04-24 17:59:49 +00007720"
Victor Stinnere0be4232011-10-25 13:06:09 +02007721if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007722 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007723#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007724_ACEOF
7725
7726fi
7727
7728done
7729
7730
Charles-François Natali47413c12011-10-06 19:47:44 +02007731# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007732for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007733do :
7734 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7735ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7736#ifdef HAVE_SYS_SOCKET_H
7737#include <sys/socket.h>
7738#endif
7739
7740"
7741if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7742 cat >>confdefs.h <<_ACEOF
7743#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7744_ACEOF
7745
7746fi
7747
7748done
7749
7750
Guido van Rossum627b2d71993-12-24 10:39:16 +00007751# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007752was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7754$as_echo_n "checking for clock_t in time.h... " >&6; }
7755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007756/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007757#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007758
7759_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007762 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007763else
Martin v. Löwis11437992002-04-12 09:54:03 +00007764
7765
Matthias Kloseb9621712010-04-24 17:59:49 +00007766$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007767
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007768
Guido van Rossum627b2d71993-12-24 10:39:16 +00007769fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007770rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007771
Matthias Kloseb9621712010-04-24 17:59:49 +00007772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7773$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007774
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7776$as_echo_n "checking for makedev... " >&6; }
7777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007778/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007779
Jesus Cea740f53a2010-04-28 11:35:30 +00007780#if defined(MAJOR_IN_MKDEV)
7781#include <sys/mkdev.h>
7782#elif defined(MAJOR_IN_SYSMACROS)
7783#include <sys/sysmacros.h>
7784#else
7785#include <sys/types.h>
7786#endif
7787
Neal Norwitz11690112002-07-30 01:08:28 +00007788int
7789main ()
7790{
Jesus Cea740f53a2010-04-28 11:35:30 +00007791
7792 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007793 ;
7794 return 0;
7795}
Matthias Kloseb159a552010-04-25 21:00:44 +00007796
Neal Norwitz11690112002-07-30 01:08:28 +00007797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007798if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007799 ac_cv_has_makedev=yes
7800else
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803rm -f core conftest.err conftest.$ac_objext \
7804 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7806$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007807if test "$ac_cv_has_makedev" = "yes"; then
7808
Matthias Kloseb9621712010-04-24 17:59:49 +00007809$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007810
7811fi
7812
Christian Heimes985ecdc2013-11-20 11:46:18 +01007813# byte swapping
7814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7815$as_echo_n "checking for le64toh... " >&6; }
7816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817/* end confdefs.h. */
7818
7819#ifdef HAVE_ENDIAN_H
7820#include <endian.h>
7821#elif defined(HAVE_SYS_ENDIAN_H)
7822#include <sys/endian.h>
7823#endif
7824
7825int
7826main ()
7827{
7828
7829 le64toh(1)
7830 ;
7831 return 0;
7832}
7833
7834_ACEOF
7835if ac_fn_c_try_link "$LINENO"; then :
7836 ac_cv_has_le64toh=yes
7837else
7838 ac_cv_has_le64toh=no
7839fi
7840rm -f core conftest.err conftest.$ac_objext \
7841 conftest$ac_exeext conftest.$ac_ext
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7843$as_echo "$ac_cv_has_le64toh" >&6; }
7844if test "$ac_cv_has_le64toh" = "yes"; then
7845
7846$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7847
7848fi
7849
Martin v. Löwis399a6892002-10-04 10:22:02 +00007850# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7851# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7852# defined, but the compiler does not support pragma redefine_extname,
7853# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7854# structures (such as rlimit64) without declaring them. As a
7855# work-around, disable LFS on such configurations
7856
7857use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7859$as_echo_n "checking Solaris LFS bug... " >&6; }
7860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007861/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007862
7863#define _LARGEFILE_SOURCE 1
7864#define _FILE_OFFSET_BITS 64
7865#include <sys/resource.h>
7866
Martin v. Löwis399a6892002-10-04 10:22:02 +00007867int
7868main ()
7869{
7870struct rlimit foo;
7871 ;
7872 return 0;
7873}
7874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007875if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007876 sol_lfs_bug=no
7877else
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7882$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007883if test "$sol_lfs_bug" = "yes"; then
7884 use_lfs=no
7885fi
7886
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007887# Don't use largefile support for GNU/Hurd
7888case $ac_sys_system in GNU*)
7889 use_lfs=no
7890esac
7891
Martin v. Löwis399a6892002-10-04 10:22:02 +00007892if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007893# Two defines needed to enable largefile support on various platforms
7894# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007895case $ac_sys_system/$ac_sys_release in
7896AIX*)
7897
7898$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7899
7900 ;;
7901esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007902
Matthias Kloseb9621712010-04-24 17:59:49 +00007903$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007904
7905
Matthias Kloseb9621712010-04-24 17:59:49 +00007906$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007907
Martin v. Löwis399a6892002-10-04 10:22:02 +00007908fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007909
Guido van Rossum84e7b241996-08-19 21:59:00 +00007910# Add some code to confdefs.h so that the test for off_t works on SCO
7911cat >> confdefs.h <<\EOF
7912#if defined(SCO_DS)
7913#undef _OFF_T
7914#endif
7915EOF
7916
Guido van Rossumef2255b2000-03-10 22:30:29 +00007917# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007918ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007919if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007921else
Martin v. Löwis11437992002-04-12 09:54:03 +00007922
7923cat >>confdefs.h <<_ACEOF
7924#define mode_t int
7925_ACEOF
7926
7927fi
7928
Matthias Kloseb9621712010-04-24 17:59:49 +00007929ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007930if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007931
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007932else
Martin v. Löwis11437992002-04-12 09:54:03 +00007933
7934cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007936_ACEOF
7937
7938fi
7939
Matthias Kloseb9621712010-04-24 17:59:49 +00007940ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007941if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007943else
Martin v. Löwis11437992002-04-12 09:54:03 +00007944
7945cat >>confdefs.h <<_ACEOF
7946#define pid_t int
7947_ACEOF
7948
7949fi
7950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007951
Martin v. Löwis11437992002-04-12 09:54:03 +00007952cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007953#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007954_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007955
Matthias Kloseb9621712010-04-24 17:59:49 +00007956ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007957if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007958
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007959else
Martin v. Löwis11437992002-04-12 09:54:03 +00007960
7961cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007963_ACEOF
7964
7965fi
7966
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7968$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007969if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007971else
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007973/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007974#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007975
7976_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979 ac_cv_type_uid_t=yes
7980else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007981 ac_cv_type_uid_t=no
7982fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007983rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007984
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7987$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007988if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007989
Matthias Kloseb9621712010-04-24 17:59:49 +00007990$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007991
7992
Matthias Kloseb9621712010-04-24 17:59:49 +00007993$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007994
7995fi
7996
Mark Dickinson983bc162012-12-02 12:11:38 +00007997
Matthias Kloseb9621712010-04-24 17:59:49 +00007998ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007999if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000
Matthias Kloseb9621712010-04-24 17:59:49 +00008001$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008002
8003fi
8004
Stefan Krah1919b7e2012-03-21 18:25:23 +01008005ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8006if test "x$ac_cv_type___uint128_t" = xyes; then :
8007
8008$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8009
8010fi
8011
Jack Jansendd19cf82001-12-06 22:36:17 +00008012
Michael W. Hudson54241132001-12-07 15:38:26 +00008013# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008014# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015# The cast to long int works around a bug in the HP C Compiler
8016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8018# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8020$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008021if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008023else
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 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 +00008025
Martin v. Löwis11437992002-04-12 09:54:03 +00008026else
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 if test "$ac_cv_type_int" = yes; then
8028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008030as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008031See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 else
8033 ac_cv_sizeof_int=0
8034 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008036
Martin v. Löwis11437992002-04-12 09:54:03 +00008037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8039$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040
8041
8042
Martin v. Löwis11437992002-04-12 09:54:03 +00008043cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008044#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008045_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008046
8047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048# The cast to long int works around a bug in the HP C Compiler
8049# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8050# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8051# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8053$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008054if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008056else
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 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 +00008058
Martin v. Löwis11437992002-04-12 09:54:03 +00008059else
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 if test "$ac_cv_type_long" = yes; then
8061 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008063as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008064See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065 else
8066 ac_cv_sizeof_long=0
8067 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008069
Martin v. Löwis11437992002-04-12 09:54:03 +00008070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8072$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073
8074
8075
Martin v. Löwis11437992002-04-12 09:54:03 +00008076cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008077#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008078_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008079
8080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081# The cast to long int works around a bug in the HP C Compiler
8082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8084# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8086$as_echo_n "checking size of long long... " >&6; }
8087if ${ac_cv_sizeof_long_long+:} false; then :
8088 $as_echo_n "(cached) " >&6
8089else
8090 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8091
8092else
8093 if test "$ac_cv_type_long_long" = yes; then
8094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8096as_fn_error 77 "cannot compute sizeof (long long)
8097See \`config.log' for more details" "$LINENO" 5; }
8098 else
8099 ac_cv_sizeof_long_long=0
8100 fi
8101fi
8102
8103fi
8104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8105$as_echo "$ac_cv_sizeof_long_long" >&6; }
8106
8107
8108
8109cat >>confdefs.h <<_ACEOF
8110#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8111_ACEOF
8112
8113
8114# The cast to long int works around a bug in the HP C Compiler
8115# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8116# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8117# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8119$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008120if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008122else
Matthias Kloseb9621712010-04-24 17:59:49 +00008123 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 +00008124
Martin v. Löwis11437992002-04-12 09:54:03 +00008125else
Matthias Kloseb9621712010-04-24 17:59:49 +00008126 if test "$ac_cv_type_void_p" = yes; then
8127 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8128$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008129as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008130See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008131 else
8132 ac_cv_sizeof_void_p=0
8133 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008135
Martin v. Löwis11437992002-04-12 09:54:03 +00008136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8138$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139
8140
8141
Martin v. Löwis11437992002-04-12 09:54:03 +00008142cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008143#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008144_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008145
8146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147# The cast to long int works around a bug in the HP C Compiler
8148# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8149# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8150# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8152$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008153if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008155else
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 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 +00008157
Martin v. Löwis11437992002-04-12 09:54:03 +00008158else
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 if test "$ac_cv_type_short" = yes; then
8160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008162as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008163See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164 else
8165 ac_cv_sizeof_short=0
8166 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008168
Martin v. Löwis11437992002-04-12 09:54:03 +00008169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8171$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172
8173
8174
Martin v. Löwis11437992002-04-12 09:54:03 +00008175cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008176#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008177_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008178
8179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180# The cast to long int works around a bug in the HP C Compiler
8181# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8182# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8183# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8185$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008186if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008188else
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 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 +00008190
Martin v. Löwis11437992002-04-12 09:54:03 +00008191else
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 if test "$ac_cv_type_float" = yes; then
8193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008195as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008196See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008197 else
8198 ac_cv_sizeof_float=0
8199 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8204$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205
8206
8207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008209#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008211
8212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213# The cast to long int works around a bug in the HP C Compiler
8214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8216# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8218$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008219if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008221else
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 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 +00008223
Martin v. Löwis11437992002-04-12 09:54:03 +00008224else
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 if test "$ac_cv_type_double" = yes; then
8226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8227$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008228as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008229See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 else
8231 ac_cv_sizeof_double=0
8232 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008234
Martin v. Löwis11437992002-04-12 09:54:03 +00008235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8237$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238
8239
8240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008242#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008243_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008244
8245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246# The cast to long int works around a bug in the HP C Compiler
8247# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8248# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8249# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8251$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008252if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008253 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008254else
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 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 +00008256
Martin v. Löwis11437992002-04-12 09:54:03 +00008257else
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 if test "$ac_cv_type_fpos_t" = yes; then
8259 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8260$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008261as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008262See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263 else
8264 ac_cv_sizeof_fpos_t=0
8265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8270$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271
8272
8273
Martin v. Löwis11437992002-04-12 09:54:03 +00008274cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008275#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008276_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008277
Michael W. Hudson54241132001-12-07 15:38:26 +00008278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279# The cast to long int works around a bug in the HP C Compiler
8280# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8281# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8282# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8284$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008285if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008287else
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 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 +00008289
Martin v. Löwis18e16552006-02-15 17:27:45 +00008290else
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 if test "$ac_cv_type_size_t" = yes; then
8292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008294as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008295See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296 else
8297 ac_cv_sizeof_size_t=0
8298 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008300
Martin v. Löwis18e16552006-02-15 17:27:45 +00008301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8303$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304
8305
8306
Martin v. Löwis18e16552006-02-15 17:27:45 +00008307cat >>confdefs.h <<_ACEOF
8308#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8309_ACEOF
8310
8311
Christian Heimes400adb02008-02-01 08:12:03 +00008312# The cast to long int works around a bug in the HP C Compiler
8313# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8314# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8315# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8317$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008318if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 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 +00008322
Christian Heimes400adb02008-02-01 08:12:03 +00008323else
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 if test "$ac_cv_type_pid_t" = yes; then
8325 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008327as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008328See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008329 else
8330 ac_cv_sizeof_pid_t=0
8331 fi
8332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008333
Christian Heimes400adb02008-02-01 08:12:03 +00008334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8336$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008337
8338
8339
8340cat >>confdefs.h <<_ACEOF
8341#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8342_ACEOF
8343
8344
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008345# The cast to long int works around a bug in the HP C Compiler
8346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8348# This bug is HP SR number 8606223364.
8349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8350$as_echo_n "checking size of uintptr_t... " >&6; }
8351if ${ac_cv_sizeof_uintptr_t+:} false; then :
8352 $as_echo_n "(cached) " >&6
8353else
8354 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8355
8356else
8357 if test "$ac_cv_type_uintptr_t" = yes; then
8358 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8360as_fn_error 77 "cannot compute sizeof (uintptr_t)
8361See \`config.log' for more details" "$LINENO" 5; }
8362 else
8363 ac_cv_sizeof_uintptr_t=0
8364 fi
8365fi
8366
8367fi
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8369$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8370
8371
8372
8373cat >>confdefs.h <<_ACEOF
8374#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8375_ACEOF
8376
8377
Michael W. Hudson54241132001-12-07 15:38:26 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8380$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008381have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008383/* end confdefs.h. */
8384
8385int
8386main ()
8387{
8388long double x; x = (long double)0;
8389 ;
8390 return 0;
8391}
8392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008393if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008394
8395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008397
8398 have_long_double=yes
8399
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008400fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8403$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008404if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008405# The cast to long int works around a bug in the HP C Compiler
8406# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8407# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8408# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8410$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008411if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008413else
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 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 +00008415
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008416else
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 if test "$ac_cv_type_long_double" = yes; then
8418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008420as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008421See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008422 else
8423 ac_cv_sizeof_long_double=0
8424 fi
8425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008426
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8429$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008430
8431
8432
8433cat >>confdefs.h <<_ACEOF
8434#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8435_ACEOF
8436
8437
8438fi
8439
8440
Matthias Kloseb9621712010-04-24 17:59:49 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8442$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008443have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008445/* end confdefs.h. */
8446
8447int
8448main ()
8449{
8450_Bool x; x = (_Bool)0;
8451 ;
8452 return 0;
8453}
8454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008455if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008456
8457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008459
8460 have_c99_bool=yes
8461
Thomas Woutersb2137042007-02-01 18:02:27 +00008462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8465$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008466if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467# The cast to long int works around a bug in the HP C Compiler
8468# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8469# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8470# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8472$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008473if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008475else
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 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 +00008477
Thomas Woutersb2137042007-02-01 18:02:27 +00008478else
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 if test "$ac_cv_type__Bool" = yes; then
8480 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008482as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008483See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484 else
8485 ac_cv_sizeof__Bool=0
8486 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008488
Thomas Woutersb2137042007-02-01 18:02:27 +00008489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8491$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492
8493
8494
Thomas Woutersb2137042007-02-01 18:02:27 +00008495cat >>confdefs.h <<_ACEOF
8496#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8497_ACEOF
8498
8499
8500fi
8501
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008502# The cast to long int works around a bug in the HP C Compiler
8503# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8504# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8505# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8507$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008508if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008512#ifdef HAVE_SYS_TYPES_H
8513#include <sys/types.h>
8514#endif
8515
Matthias Kloseb9621712010-04-24 17:59:49 +00008516"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008517
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008518else
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 if test "$ac_cv_type_off_t" = yes; then
8520 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8521$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008522as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008523See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008524 else
8525 ac_cv_sizeof_off_t=0
8526 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008528
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8531$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008532
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008533
8534
Martin v. Löwis11437992002-04-12 09:54:03 +00008535cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008536#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008537_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008538
Michael W. Hudson54241132001-12-07 15:38:26 +00008539
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008540
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8542$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008543if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008544 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8549$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8552$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008553fi
8554
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008555# The cast to long int works around a bug in the HP C Compiler
8556# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8557# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8558# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8560$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008561if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008563else
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008565#ifdef HAVE_SYS_TYPES_H
8566#include <sys/types.h>
8567#endif
8568#ifdef HAVE_TIME_H
8569#include <time.h>
8570#endif
8571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008573
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 if test "$ac_cv_type_time_t" = yes; then
8576 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8577$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008578as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008579See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008580 else
8581 ac_cv_sizeof_time_t=0
8582 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8587$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008588
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008589
8590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008592#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008593_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008594
Michael W. Hudson54241132001-12-07 15:38:26 +00008595
8596
Trent Mick635f6fb2000-08-23 21:33:05 +00008597# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008598ac_save_cc="$CC"
8599if test "$ac_cv_kpthread" = "yes"
8600then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008601elif test "$ac_cv_kthread" = "yes"
8602then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008603elif test "$ac_cv_pthread" = "yes"
8604then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008605fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008606
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8608$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008609have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008611/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008612
8613 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008614int
8615main ()
8616{
Guido van Rossum12580492000-09-24 16:47:19 +00008617pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 ;
8619 return 0;
8620}
Matthias Kloseb159a552010-04-25 21:00:44 +00008621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008623if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008624 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8628$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008629if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008631# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8632# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8633# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8635$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008636if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008638else
Matthias Kloseb9621712010-04-24 17:59:49 +00008639 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008640#ifdef HAVE_PTHREAD_H
8641#include <pthread.h>
8642#endif
8643
Matthias Kloseb9621712010-04-24 17:59:49 +00008644"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008645
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008646else
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 if test "$ac_cv_type_pthread_t" = yes; then
8648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008650as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008651See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008652 else
8653 ac_cv_sizeof_pthread_t=0
8654 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656
Trent Mick635f6fb2000-08-23 21:33:05 +00008657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8659$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008661
8662
Martin v. Löwis11437992002-04-12 09:54:03 +00008663cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008664#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008665_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008666
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008667
Trent Mick635f6fb2000-08-23 21:33:05 +00008668fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008669CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008670
Michael W. Hudson54241132001-12-07 15:38:26 +00008671
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008672case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008673 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008674 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8675 ;;
8676 Darwin/*)
8677 OTHER_LIBTOOL_OPT=""
8678 ;;
8679esac
8680
8681
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008682
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008683case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008684 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008685 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8686 if test "${enable_universalsdk}"; then
8687 :
8688 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008689 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008690 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008691 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008692 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008693 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008694 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008695 if test ${gcc_version} '<' 4.0
8696 then
8697 LIBTOOL_CRUFT="-lcc_dynamic"
8698 else
8699 LIBTOOL_CRUFT=""
8700 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008702 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008703else
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008705/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008706
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008707 #include <unistd.h>
8708 int main(int argc, char*argv[])
8709 {
8710 if (sizeof(long) == 4) {
8711 return 0;
8712 } else {
8713 return 1;
8714 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008715 }
8716
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008718if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008719 ac_osx_32bit=yes
8720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008725fi
8726
8727
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008728 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008729 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008730 i386)
8731 MACOSX_DEFAULT_ARCH="i386"
8732 ;;
8733 ppc)
8734 MACOSX_DEFAULT_ARCH="ppc"
8735 ;;
8736 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008737 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008738 ;;
8739 esac
8740 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008741 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008742 i386)
8743 MACOSX_DEFAULT_ARCH="x86_64"
8744 ;;
8745 ppc)
8746 MACOSX_DEFAULT_ARCH="ppc64"
8747 ;;
8748 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008749 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008750 ;;
8751 esac
8752
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008753 fi
8754
8755 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008756 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008757 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008758esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8760$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008761if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008762then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008763 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008765 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8770$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008771 if test $enable_shared = "yes"
8772 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008773 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 +00008774 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8777$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008778fi
8779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8781$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008782case $ac_sys_system/$ac_sys_release in
8783 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008786
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8788$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008789 ;;
8790 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008793 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008794esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008795
Guido van Rossum0a516c91994-09-12 10:58:40 +00008796# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008797
Michael W. Hudson54241132001-12-07 15:38:26 +00008798
8799
8800
8801
Benjamin Peterson99f03762010-04-11 22:15:28 +00008802
Thomas Wouters477c8d52006-05-27 19:21:47 +00008803
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008804# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8805# -- usually .so, .sl on HP-UX, .dll on Cygwin
8806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8807$as_echo_n "checking the extension of shared libraries... " >&6; }
8808if test -z "$SHLIB_SUFFIX"; then
8809 case $ac_sys_system in
8810 hp*|HP*)
8811 case `uname -m` in
8812 ia64) SHLIB_SUFFIX=.so;;
8813 *) SHLIB_SUFFIX=.sl;;
8814 esac
8815 ;;
8816 CYGWIN*) SHLIB_SUFFIX=.dll;;
8817 *) SHLIB_SUFFIX=.so;;
8818 esac
8819fi
8820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8821$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008822
Guido van Rossum0a516c91994-09-12 10:58:40 +00008823# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008824# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008825# (Shared libraries in this instance are shared modules to be loaded into
8826# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8828$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008829if test -z "$LDSHARED"
8830then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008831 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008832 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008833 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008834 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008835 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008836 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008837 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008839 if test "$GCC" = "yes" ; then
8840 LDSHARED='$(CC) -shared'
8841 LDCXXSHARED='$(CXX) -shared'
8842 else
8843 LDSHARED='$(CC) -G'
8844 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008845 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008846 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008847 if test "$GCC" = "yes" ; then
8848 LDSHARED='$(CC) -shared'
8849 LDCXXSHARED='$(CXX) -shared'
8850 else
8851 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008852 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008853 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008854 LDSHARED='$(CC) -bundle'
8855 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008856 if test "$enable_framework" ; then
8857 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008858 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8859 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008860 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008861 else
8862 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008863 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008864 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008865 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008866 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008867 LDSHARED='$(CC) -bundle'
8868 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008869 if test "$enable_framework" ; then
8870 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008871 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8872 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008873 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008874 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008875 # No framework, use the Python app as bundle-loader
8876 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008877 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008878 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008879 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008880 Darwin/*)
8881 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8882 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008883
Ned Deily36820b62014-06-25 13:44:22 -07008884 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8885 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8886 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8887 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8888 if test ${dep_target_major} -eq 10 && \
8889 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008890 then
Ned Deily36820b62014-06-25 13:44:22 -07008891 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008892 LDSHARED='$(CC) -bundle'
8893 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008894 if test "$enable_framework" ; then
8895 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008896 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8897 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008898 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008899 else
8900 # No framework, use the Python app as bundle-loader
8901 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8902 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008903 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008904 fi
Ned Deily36820b62014-06-25 13:44:22 -07008905 else
8906 # building for OS X 10.3 and later
8907 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8908 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8909 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008910 fi
8911 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008912 Linux*|GNU*|QNX*)
8913 LDSHARED='$(CC) -shared'
8914 LDCXXSHARED='$(CXX) -shared';;
8915 BSD/OS*/4*)
8916 LDSHARED="gcc -shared"
8917 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008918 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008919 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008920 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008921 LDSHARED='$(CC) -shared'
8922 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008923 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008924 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008925 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008926 OpenBSD*)
8927 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8928 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008929 LDSHARED='$(CC) -shared $(CCSHARED)'
8930 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008931 else
8932 case `uname -r` in
8933 [01].* | 2.[0-7] | 2.[0-7].*)
8934 LDSHARED="ld -Bshareable ${LDFLAGS}"
8935 ;;
8936 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008937 LDSHARED='$(CC) -shared $(CCSHARED)'
8938 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008939 ;;
8940 esac
8941 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008942 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008943 LDSHARED='$(CC) -shared'
8944 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008945 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008946 if test "$GCC" = "yes" ; then
8947 LDSHARED='$(CC) -shared'
8948 LDCXXSHARED='$(CXX) -shared'
8949 else
8950 LDSHARED='$(CC) -G'
8951 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008952 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008953 SCO_SV*)
8954 LDSHARED='$(CC) -Wl,-G,-Bexport'
8955 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8956 CYGWIN*)
8957 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8958 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008959 *) LDSHARED="ld";;
8960 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8963$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008964LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008965BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008966# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008967# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8969$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008970if test -z "$CCSHARED"
8971then
Guido van Rossum07397971997-04-29 21:49:50 +00008972 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008973 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008974 then CCSHARED="-fPIC";
8975 elif test `uname -p` = sparc;
8976 then CCSHARED="-xcode=pic32";
8977 else CCSHARED="-Kpic";
8978 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008979 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008980 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008981 else CCSHARED="+z";
8982 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008983 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008984 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008985 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008986 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008987 if test "$GCC" = "yes"
8988 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008989 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008990 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008991 SCO_SV*)
8992 if test "$GCC" = "yes"
8993 then CCSHARED="-fPIC"
8994 else CCSHARED="-Kpic -belf"
8995 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008996 IRIX*/6*) case $CC in
8997 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008998 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008999 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009000 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9003$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009004# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009005# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9007$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009008if test -z "$LINKFORSHARED"
9009then
Guido van Rossum07397971997-04-29 21:49:50 +00009010 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009011 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009012 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009013 LINKFORSHARED="-Wl,-E -Wl,+s";;
9014# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009015 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009016 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009017 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009019 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009020
9021 # Issue #18075: the default maximum stack size (8MBytes) is too
9022 # small for the default recursion limit. Increase the stack size
9023 # to ensure that tests don't crash
9024 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9025
Jack Jansene578a632001-08-15 01:27:14 +00009026 if test "$enable_framework"
9027 then
Jack Jansenda49e192005-01-07 13:08:22 +00009028 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009029 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009030 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009031 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009032 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009033 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009034 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009035 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9036 then
9037 LINKFORSHARED="-Wl,--export-dynamic"
9038 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009039 SunOS/5*) case $CC in
9040 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009041 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009042 then
9043 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009044 fi;;
9045 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009046 CYGWIN*)
9047 if test $enable_shared = "no"
9048 then
9049 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9050 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009051 QNX*)
9052 # -Wl,-E causes the symbols to be added to the dynamic
9053 # symbol table so that they can be found when a module
9054 # is loaded. -N 2048K causes the stack size to be set
9055 # to 2048 kilobytes so that the stack doesn't overflow
9056 # when running test_compile.py.
9057 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009058 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9061$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009062
Michael W. Hudson54241132001-12-07 15:38:26 +00009063
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9066$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009067if test ! "$LIBRARY" = "$LDLIBRARY"
9068then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009069 case $ac_sys_system in
9070 CYGWIN*)
9071 # Cygwin needs CCSHARED when building extension DLLs
9072 # but not when building the interpreter DLL.
9073 CFLAGSFORSHARED='';;
9074 *)
9075 CFLAGSFORSHARED='$(CCSHARED)'
9076 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9079$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009080
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009081# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9082# library (with --enable-shared).
9083# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009084# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9085# if it is not required, since it creates a dependency of the shared library
9086# to LIBS. This, in turn, means that applications linking the shared libpython
9087# don't need to link LIBS explicitly. The default should be only changed
9088# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009089
Matthias Kloseb9621712010-04-24 17:59:49 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9091$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009092case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009093 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009094 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009095esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9097$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009098
9099
Guido van Rossum627b2d71993-12-24 10:39:16 +00009100# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9102$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009103if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009104 $as_echo_n "(cached) " >&6
9105else
9106 ac_check_lib_save_LIBS=$LIBS
9107LIBS="-lsendfile $LIBS"
9108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9109/* end confdefs.h. */
9110
9111/* Override any GCC internal prototype to avoid an error.
9112 Use char because int might match the return type of a GCC
9113 builtin and then its argument prototype would still apply. */
9114#ifdef __cplusplus
9115extern "C"
9116#endif
9117char sendfile ();
9118int
9119main ()
9120{
9121return sendfile ();
9122 ;
9123 return 0;
9124}
9125_ACEOF
9126if ac_fn_c_try_link "$LINENO"; then :
9127 ac_cv_lib_sendfile_sendfile=yes
9128else
9129 ac_cv_lib_sendfile_sendfile=no
9130fi
9131rm -f core conftest.err conftest.$ac_objext \
9132 conftest$ac_exeext conftest.$ac_ext
9133LIBS=$ac_check_lib_save_LIBS
9134fi
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9136$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009137if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009138 cat >>confdefs.h <<_ACEOF
9139#define HAVE_LIBSENDFILE 1
9140_ACEOF
9141
9142 LIBS="-lsendfile $LIBS"
9143
9144fi
9145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9147$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009148if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009150else
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009152LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009156/* Override any GCC internal prototype to avoid an error.
9157 Use char because int might match the return type of a GCC
9158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009159#ifdef __cplusplus
9160extern "C"
9161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009162char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009163int
9164main ()
9165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009166return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 ;
9168 return 0;
9169}
9170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009173else
Matthias Kloseb9621712010-04-24 17:59:49 +00009174 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009176rm -f core conftest.err conftest.$ac_objext \
9177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009178LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9181$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009182if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 cat >>confdefs.h <<_ACEOF
9184#define HAVE_LIBDL 1
9185_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009186
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009187 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009189fi
9190 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9192$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009193if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009194 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009195else
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009197LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201/* Override any GCC internal prototype to avoid an error.
9202 Use char because int might match the return type of a GCC
9203 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204#ifdef __cplusplus
9205extern "C"
9206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009207char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009208int
9209main ()
9210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ;
9213 return 0;
9214}
9215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009216if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009218else
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221rm -f core conftest.err conftest.$ac_objext \
9222 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009223LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9226$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009227if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 cat >>confdefs.h <<_ACEOF
9229#define HAVE_LIBDLD 1
9230_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009231
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009232 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009234fi
9235 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009236
Georg Brandlb1441c72009-01-03 22:33:39 +00009237# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009238if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9240$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009241if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009242 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009243else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009244 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248/* Override any GCC internal prototype to avoid an error.
9249 Use char because int might match the return type of a GCC
9250 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009251#ifdef __cplusplus
9252extern "C"
9253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009254char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009255int
9256main ()
9257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 ;
9260 return 0;
9261}
9262_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263for ac_lib in '' pthread rt posix4; do
9264 if test -z "$ac_lib"; then
9265 ac_res="none required"
9266 else
9267 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009268 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009273rm -f core conftest.err conftest.$ac_objext \
9274 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009275 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009276 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278done
Victor Stinnere0be4232011-10-25 13:06:09 +02009279if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009280
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281else
9282 ac_cv_search_sem_init=no
9283fi
9284rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009285LIBS=$ac_func_search_save_LIBS
9286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9288$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009289ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009290if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009292
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009293fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009294 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009295 # posix4 on Solaris 2.6
9296 # pthread (first!) on Linux
9297fi
9298
Martin v. Löwis19d17342003-06-14 21:03:05 +00009299# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9301$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009302if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009303 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009304else
9305 ac_check_lib_save_LIBS=$LIBS
9306LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009308/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009310/* Override any GCC internal prototype to avoid an error.
9311 Use char because int might match the return type of a GCC
9312 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009313#ifdef __cplusplus
9314extern "C"
9315#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009316char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009317int
9318main ()
9319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009321 ;
9322 return 0;
9323}
9324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009325if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009326 ac_cv_lib_intl_textdomain=yes
9327else
Matthias Kloseb9621712010-04-24 17:59:49 +00009328 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009330rm -f core conftest.err conftest.$ac_objext \
9331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009332LIBS=$ac_check_lib_save_LIBS
9333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9335$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009336if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009337
Matthias Kloseb9621712010-04-24 17:59:49 +00009338$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009339
Brett Cannonc6d936e2009-06-07 20:09:53 +00009340 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009341fi
9342
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009343
9344# checks for system dependent C++ extensions support
9345case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9347$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009349/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009350
Georg Brandl59e87bd2011-02-15 19:48:59 +00009351 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009352int
9353main ()
9354{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009355loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ;
9357 return 0;
9358}
Matthias Kloseb159a552010-04-25 21:00:44 +00009359
Martin v. Löwis11437992002-04-12 09:54:03 +00009360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009361if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009362
Matthias Kloseb159a552010-04-25 21:00:44 +00009363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009365
Matthias Kloseb159a552010-04-25 21:00:44 +00009366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009367$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009368
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009369else
Matthias Kloseb159a552010-04-25 21:00:44 +00009370
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009373
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009375rm -f core conftest.err conftest.$ac_objext \
9376 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009377 *) ;;
9378esac
9379
Christian Heimes985ecdc2013-11-20 11:46:18 +01009380# check for systems that require aligned memory access
9381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9382$as_echo_n "checking aligned memory access is required... " >&6; }
9383if test "$cross_compiling" = yes; then :
9384 aligned_required=yes
9385else
9386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9387/* end confdefs.h. */
9388
9389int main()
9390{
9391 char s[16];
9392 int i, *p1, *p2;
9393 for (i=0; i < 16; i++)
9394 s[i] = i;
9395 p1 = (int*)(s+1);
9396 p2 = (int*)(s+2);
9397 if (*p1 == *p2)
9398 return 1;
9399 return 0;
9400}
9401
9402_ACEOF
9403if ac_fn_c_try_run "$LINENO"; then :
9404 aligned_required=no
9405else
9406 aligned_required=yes
9407fi
9408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9409 conftest.$ac_objext conftest.beam conftest.$ac_ext
9410fi
9411
9412
9413if test "$aligned_required" = yes ; then
9414
9415$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9416
9417fi
9418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9419$as_echo "$aligned_required" >&6; }
9420
9421
9422# str, bytes and memoryview hash algorithm
9423
9424
9425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9426$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9427
9428# Check whether --with-hash_algorithm was given.
9429if test "${with_hash_algorithm+set}" = set; then :
9430 withval=$with_hash_algorithm;
9431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9432$as_echo "$withval" >&6; }
9433case "$withval" in
9434 siphash24)
9435 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9436
9437 ;;
9438 fnv)
9439 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9440
9441 ;;
9442 *)
9443 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9444 ;;
9445esac
9446
9447else
9448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9449$as_echo "default" >&6; }
9450fi
9451
9452
Charles-François Natalid30b0222014-05-08 23:08:51 +01009453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9454$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9455
9456# Check whether --with-address_sanitizer was given.
9457if test "${with_address_sanitizer+set}" = set; then :
9458 withval=$with_address_sanitizer;
9459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9460$as_echo "$withval" >&6; }
9461BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9462LDFLAGS="-fsanitize=address $LDFLAGS"
9463
9464else
9465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9466$as_echo "no" >&6; }
9467fi
9468
9469
Guido van Rossum70c7f481998-03-26 18:44:10 +00009470# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9472$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009474 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009475else
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009477LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481/* Override any GCC internal prototype to avoid an error.
9482 Use char because int might match the return type of a GCC
9483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009484#ifdef __cplusplus
9485extern "C"
9486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009487char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009488int
9489main ()
9490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009491return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 ;
9493 return 0;
9494}
9495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009498else
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009501rm -f core conftest.err conftest.$ac_objext \
9502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009503LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9506$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009507if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009508 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009509fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009510 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9512$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009513if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009514 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009515else
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009517LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521/* Override any GCC internal prototype to avoid an error.
9522 Use char because int might match the return type of a GCC
9523 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009524#ifdef __cplusplus
9525extern "C"
9526#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009527char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009528int
9529main ()
9530{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009532 ;
9533 return 0;
9534}
9535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009536if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009538else
Matthias Kloseb9621712010-04-24 17:59:49 +00009539 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009541rm -f core conftest.err conftest.$ac_objext \
9542 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009543LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9546$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009547if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009548 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009549fi
9550 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009551
Matthias Kloseb9621712010-04-24 17:59:49 +00009552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9553$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009556if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9559$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009560LIBS="$withval $LIBS"
9561
9562else
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565fi
9566
Guido van Rossum7f43da71994-08-01 12:15:30 +00009567
Victor Stinner8291b5e2015-03-20 16:03:14 +01009568
9569
9570
9571
9572
9573
9574
9575if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9576 if test -n "$ac_tool_prefix"; then
9577 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9578set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9580$as_echo_n "checking for $ac_word... " >&6; }
9581if ${ac_cv_path_PKG_CONFIG+:} false; then :
9582 $as_echo_n "(cached) " >&6
9583else
9584 case $PKG_CONFIG in
9585 [\\/]* | ?:[\\/]*)
9586 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9587 ;;
9588 *)
9589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9590for as_dir in $PATH
9591do
9592 IFS=$as_save_IFS
9593 test -z "$as_dir" && as_dir=.
9594 for ac_exec_ext in '' $ac_executable_extensions; do
9595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9596 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9598 break 2
9599 fi
9600done
9601 done
9602IFS=$as_save_IFS
9603
9604 ;;
9605esac
9606fi
9607PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9608if test -n "$PKG_CONFIG"; then
9609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9610$as_echo "$PKG_CONFIG" >&6; }
9611else
9612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9613$as_echo "no" >&6; }
9614fi
9615
9616
9617fi
9618if test -z "$ac_cv_path_PKG_CONFIG"; then
9619 ac_pt_PKG_CONFIG=$PKG_CONFIG
9620 # Extract the first word of "pkg-config", so it can be a program name with args.
9621set dummy pkg-config; ac_word=$2
9622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9623$as_echo_n "checking for $ac_word... " >&6; }
9624if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9625 $as_echo_n "(cached) " >&6
9626else
9627 case $ac_pt_PKG_CONFIG in
9628 [\\/]* | ?:[\\/]*)
9629 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9630 ;;
9631 *)
9632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9633for as_dir in $PATH
9634do
9635 IFS=$as_save_IFS
9636 test -z "$as_dir" && as_dir=.
9637 for ac_exec_ext in '' $ac_executable_extensions; do
9638 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9639 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9640 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9641 break 2
9642 fi
9643done
9644 done
9645IFS=$as_save_IFS
9646
9647 ;;
9648esac
9649fi
9650ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9651if test -n "$ac_pt_PKG_CONFIG"; then
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9653$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9654else
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
9657fi
9658
9659 if test "x$ac_pt_PKG_CONFIG" = x; then
9660 PKG_CONFIG=""
9661 else
9662 case $cross_compiling:$ac_tool_warned in
9663yes:)
9664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9666ac_tool_warned=yes ;;
9667esac
9668 PKG_CONFIG=$ac_pt_PKG_CONFIG
9669 fi
9670else
9671 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9672fi
9673
9674fi
9675if test -n "$PKG_CONFIG"; then
9676 _pkg_min_version=0.9.0
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9678$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9679 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9681$as_echo "yes" >&6; }
9682 else
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
9685 PKG_CONFIG=""
9686 fi
9687fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009688
9689# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9691$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009692
9693# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009694if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009695 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009696else
9697 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009698fi
9699
9700
Matthias Kloseb9621712010-04-24 17:59:49 +00009701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9702$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009703
9704# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9706$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009707
9708# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009709if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009710 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009711else
9712 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009713fi
9714
9715
9716if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009717 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9718else
9719 LIBFFI_INCLUDEDIR=""
9720fi
9721
9722
Matthias Kloseb9621712010-04-24 17:59:49 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9724$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009725
Stefan Krah60187b52012-03-23 19:06:27 +01009726# Check for use of the system libmpdec library
9727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9728$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9729
9730# Check whether --with-system_libmpdec was given.
9731if test "${with_system_libmpdec+set}" = set; then :
9732 withval=$with_system_libmpdec;
9733else
9734 with_system_libmpdec="no"
9735fi
9736
9737
9738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9739$as_echo "$with_system_libmpdec" >&6; }
9740
Benjamin Peterson076ed002010-10-31 17:11:02 +00009741# Check for support for loadable sqlite extensions
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9743$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9744# Check whether --enable-loadable-sqlite-extensions was given.
9745if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9746 enableval=$enable_loadable_sqlite_extensions;
9747else
9748 enable_loadable_sqlite_extensions="no"
9749fi
9750
9751
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9753$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9754
Ned Deilyd819b932013-09-06 01:07:05 -07009755# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9756
9757
9758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9759$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9760
9761# Check whether --with-tcltk-includes was given.
9762if test "${with_tcltk_includes+set}" = set; then :
9763 withval=$with_tcltk_includes;
9764else
9765 with_tcltk_includes="default"
9766fi
9767
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9769$as_echo "$with_tcltk_includes" >&6; }
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9771$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9772
9773# Check whether --with-tcltk-libs was given.
9774if test "${with_tcltk_libs+set}" = set; then :
9775 withval=$with_tcltk_libs;
9776else
9777 with_tcltk_libs="default"
9778fi
9779
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9781$as_echo "$with_tcltk_libs" >&6; }
9782if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9783then
9784 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9785 then
9786 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9787 fi
9788 TCLTK_INCLUDES=""
9789 TCLTK_LIBS=""
9790else
9791 TCLTK_INCLUDES="$with_tcltk_includes"
9792 TCLTK_LIBS="$with_tcltk_libs"
9793fi
9794
Matthias Klose55708cc2009-04-30 08:06:49 +00009795# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9797$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009798
9799# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009800if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009801 withval=$with_dbmliborder;
9802if test x$with_dbmliborder = xyes
9803then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009804as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009805else
9806 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9807 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9808 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009809 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009810 fi
9811 done
9812fi
9813fi
9814
Matthias Kloseb9621712010-04-24 17:59:49 +00009815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9816$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009817
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009818# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009819
9820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9822$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009825if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826 withval=$with_signal_module;
9827fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009828
9829
9830if test -z "$with_signal_module"
9831then with_signal_module="yes"
9832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9834$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009835
9836if test "${with_signal_module}" = "yes"; then
9837 USE_SIGNAL_MODULE=""
9838 SIGNAL_OBJS=""
9839else
9840 USE_SIGNAL_MODULE="#"
9841 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9842fi
9843
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009844# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009845
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009846USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848
Martin v. Löwis11437992002-04-12 09:54:03 +00009849
9850# Templates for things AC_DEFINEd more than once.
9851# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009852
9853
Martin v. Löwis11437992002-04-12 09:54:03 +00009854
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9856$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009859if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860 withval=$with_threads;
9861fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009862
9863
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009864# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009867if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868 withval=$with_thread; with_threads=$with_thread
9869fi
9870
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009871
9872if test -z "$with_threads"
9873then with_threads="yes"
9874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9876$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009877
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009878
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009879if test "$with_threads" = "no"
9880then
9881 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009882elif test "$ac_cv_pthread_is_default" = yes
9883then
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009885
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009886 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009888
9889 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009891elif test "$ac_cv_kpthread" = "yes"
9892then
9893 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009894 if test "$ac_cv_cxx_thread" = "yes"; then
9895 CXX="$CXX -Kpthread"
9896 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009898
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009899 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009900 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009901elif test "$ac_cv_kthread" = "yes"
9902then
9903 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009904 if test "$ac_cv_cxx_thread" = "yes"; then
9905 CXX="$CXX -Kthread"
9906 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009908
9909 posix_threads=yes
9910 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009911elif test "$ac_cv_pthread" = "yes"
9912then
9913 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009914 if test "$ac_cv_cxx_thread" = "yes"; then
9915 CXX="$CXX -pthread"
9916 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009918
9919 posix_threads=yes
9920 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009921else
9922 if test ! -z "$with_threads" -a -d "$with_threads"
9923 then LDFLAGS="$LDFLAGS -L$with_threads"
9924 fi
9925 if test ! -z "$withval" -a -d "$withval"
9926 then LDFLAGS="$LDFLAGS -L$withval"
9927 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009928
9929 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009930 # define _POSIX_THREADS in unistd.h. Some apparently don't
9931 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9933$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009935/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009936
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009937#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009938#ifdef _POSIX_THREADS
9939yes
9940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009941
9942_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009945 unistd_defines_pthreads=yes
9946else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009947 unistd_defines_pthreads=no
9948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009949rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009950
Matthias Kloseb9621712010-04-24 17:59:49 +00009951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9952$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009955
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009956 # Just looking for pthread_create in libpthread is not enough:
9957 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9958 # So we really have to include pthread.h, and then link.
9959 _libs=$LIBS
9960 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9962$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009964/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009965
9966#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009967#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009968
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009969void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009970int
9971main ()
9972{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009973
9974pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 ;
9976 return 0;
9977}
9978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009980
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9982$as_echo "yes" >&6; }
9983 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009984
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009985 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009986 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009987else
Martin v. Löwis11437992002-04-12 09:54:03 +00009988
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009989 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009991if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009992 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009993
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009994 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009995 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009996else
Guido van Rossumad678af1998-10-02 14:42:15 +00009997
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9999$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010000if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010002else
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010004LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008/* Override any GCC internal prototype to avoid an error.
10009 Use char because int might match the return type of a GCC
10010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010011#ifdef __cplusplus
10012extern "C"
10013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010014char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010015int
10016main ()
10017{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010018return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ;
10020 return 0;
10021}
10022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010025else
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010028rm -f core conftest.err conftest.$ac_objext \
10029 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010030LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10033$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010034if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010037 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010038 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010039 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010040else
Greg Steinadf63d62000-07-05 10:38:09 +000010041
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10043$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010044if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010045 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010046else
Martin v. Löwis11437992002-04-12 09:54:03 +000010047 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010048LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010052/* Override any GCC internal prototype to avoid an error.
10053 Use char because int might match the return type of a GCC
10054 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010055#ifdef __cplusplus
10056extern "C"
10057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010058char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010059int
10060main ()
10061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ;
10064 return 0;
10065}
10066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010069else
Matthias Kloseb9621712010-04-24 17:59:49 +000010070 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010072rm -f core conftest.err conftest.$ac_objext \
10073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010074LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10077$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010078if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010079 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010080
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010081 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010082 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010083 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010084else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010085
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10087$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010088if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010090else
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010092LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096/* Override any GCC internal prototype to avoid an error.
10097 Use char because int might match the return type of a GCC
10098 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010099#ifdef __cplusplus
10100extern "C"
10101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010102char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010103int
10104main ()
10105{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 ;
10108 return 0;
10109}
10110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010111if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010112 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010113else
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010116rm -f core conftest.err conftest.$ac_objext \
10117 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010118LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10121$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010122if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010124
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010125 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010126 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010127 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010128else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10131$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010132if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010133 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010134else
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010136LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140/* Override any GCC internal prototype to avoid an error.
10141 Use char because int might match the return type of a GCC
10142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010143#ifdef __cplusplus
10144extern "C"
10145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010146char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010147int
10148main ()
10149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010150return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010151 ;
10152 return 0;
10153}
10154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010155if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010160rm -f core conftest.err conftest.$ac_objext \
10161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010162LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10165$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010166if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010168
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010169 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010170 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010171 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010172else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010173
Martin v. Löwis130fb172001-07-19 11:00:41 +000010174 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010175fi
10176
Guido van Rossum627b2d71993-12-24 10:39:16 +000010177
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010178fi
10179
Guido van Rossum0be3e491997-05-22 20:33:33 +000010180fi
10181
Guido van Rossum49545951997-12-02 19:28:29 +000010182fi
10183
Guido van Rossumb93a8621998-05-07 13:27:32 +000010184fi
10185
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010187rm -f core conftest.err conftest.$ac_objext \
10188 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010189
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10191$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010192if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010194else
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010196LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200/* Override any GCC internal prototype to avoid an error.
10201 Use char because int might match the return type of a GCC
10202 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010203#ifdef __cplusplus
10204extern "C"
10205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010206char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010207int
10208main ()
10209{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 ;
10212 return 0;
10213}
10214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010215if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010217else
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010220rm -f core conftest.err conftest.$ac_objext \
10221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010222LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10225$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010226if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010228
Martin v. Löwis130fb172001-07-19 11:00:41 +000010229 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010230 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010231 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010232fi
10233
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010234
Neal Norwitza978ab02002-11-02 16:58:05 +000010235 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10237$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010238if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010240else
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010242LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246/* Override any GCC internal prototype to avoid an error.
10247 Use char because int might match the return type of a GCC
10248 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010249#ifdef __cplusplus
10250extern "C"
10251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010252char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010253int
10254main ()
10255{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 ;
10258 return 0;
10259}
10260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010263else
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010266rm -f core conftest.err conftest.$ac_objext \
10267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010268LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10271$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010272if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010274
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010275 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010276 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010277 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010278fi
10279
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010280 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010281fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010282
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010283if test "$posix_threads" = "yes"; then
10284 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010287
10288 fi
10289
10290 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10291 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010292 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010293$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010294
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010295 ;;
10296 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010297$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010298
10299 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010300 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010301$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010302
10303 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010304 esac
10305
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10307$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010308 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010310else
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010312 ac_cv_pthread_system_supported=no
10313else
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010315/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010316
10317 #include <stdio.h>
10318 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010319 void *foo(void *parm) {
10320 return NULL;
10321 }
10322 main() {
10323 pthread_attr_t attr;
10324 pthread_t id;
10325 if (pthread_attr_init(&attr)) exit(-1);
10326 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10327 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10328 exit(0);
10329 }
10330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010332 ac_cv_pthread_system_supported=yes
10333else
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10337 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010338fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340
Guido van Rossum627b2d71993-12-24 10:39:16 +000010341fi
10342
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10344$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010345 if test "$ac_cv_pthread_system_supported" = "yes"; then
10346
Matthias Kloseb9621712010-04-24 17:59:49 +000010347$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010348
10349 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 for ac_func in pthread_sigmask
10351do :
10352 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010353if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010354 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010355#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010356_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010357 case $ac_sys_system in
10358 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010359
Matthias Kloseb9621712010-04-24 17:59:49 +000010360$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010361
10362 ;;
10363 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010364fi
10365done
10366
Christian Heimesf77b4b22013-08-21 13:26:05 +020010367 for ac_func in pthread_atfork
10368do :
10369 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10370if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10371 cat >>confdefs.h <<_ACEOF
10372#define HAVE_PTHREAD_ATFORK 1
10373_ACEOF
10374
10375fi
10376done
10377
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010378fi
10379
10380
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010381# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010382
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10384$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010386if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010388 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010391 ipv6=no
10392 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10394$as_echo "yes" >&6; }
10395 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010396
10397 ipv6=yes
10398 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010400else
Martin v. Löwis11437992002-04-12 09:54:03 +000010401
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010403/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010404 /* AF_INET6 available check */
10405#include <sys/types.h>
10406#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010407int
10408main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010409{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010410int domain = AF_INET6;
10411 ;
10412 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010413}
Martin v. Löwis11437992002-04-12 09:54:03 +000010414_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010415if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010416
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10418$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010419 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010420
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010421else
Matthias Kloseb159a552010-04-25 21:00:44 +000010422
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10424$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010425 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010426
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010427fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010430if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10432$as_echo_n "checking if RFC2553 API is available... " >&6; }
10433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010434/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010435
10436 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010437#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010438int
10439main ()
10440{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010441struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010442 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ;
10444 return 0;
10445}
Matthias Kloseb159a552010-04-25 21:00:44 +000010446
Martin v. Löwis11437992002-04-12 09:54:03 +000010447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010448if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010449
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010451$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010452 ipv6=yes
10453
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010454else
Matthias Kloseb159a552010-04-25 21:00:44 +000010455
10456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010457$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010458 ipv6=no
10459
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010462fi
10463
10464if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010466
10467fi
10468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469fi
10470
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010471
10472ipv6type=unknown
10473ipv6lib=none
10474ipv6trylibc=no
10475
10476if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10478$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010479 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10480 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010481 case $i in
10482 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010484/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010485
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010486#include <netinet/in.h>
10487#ifdef IPV6_INRIA_VERSION
10488yes
10489#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010490_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010493 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010494fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010495rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010496
10497 ;;
10498 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010500/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010501
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010502#include <netinet/in.h>
10503#ifdef __KAME__
10504yes
10505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010506_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010509 ipv6type=$i;
10510 ipv6lib=inet6
10511 ipv6libdir=/usr/local/v6/lib
10512 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010513fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010514rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010515
10516 ;;
10517 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010519/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010520
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010521#include <features.h>
10522#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10523yes
10524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010525_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010528 ipv6type=$i;
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-inet6)
10535 if test -d /usr/inet6; then
10536 ipv6type=$i
10537 ipv6lib=inet6
10538 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010539 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010540 fi
10541 ;;
10542 solaris)
10543 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010544 if $GREP -q tcp6 /etc/netconfig; 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 +000010547 fi
10548 fi
10549 ;;
10550 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010552/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010553
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010554#include <sys/param.h>
10555#ifdef _TOSHIBA_INET6
10556yes
10557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010558_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010561 ipv6type=$i;
10562 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010563 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010564fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010565rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010566
10567 ;;
10568 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010570/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010571
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010572#include </usr/local/v6/include/sys/v6config.h>
10573#ifdef __V6D__
10574yes
10575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010576_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010579 ipv6type=$i;
10580 ipv6lib=v6;
10581 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010582 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010583fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010584rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010585
10586 ;;
10587 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010589/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010590
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010591#include <sys/param.h>
10592#ifdef _ZETA_MINAMI_INET6
10593yes
10594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010595_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010598 ipv6type=$i;
10599 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010600 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010601fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010602rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603
10604 ;;
10605 esac
10606 if test "$ipv6type" != "unknown"; then
10607 break
10608 fi
10609 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10611$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010612fi
10613
10614if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10615 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10616 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10617 echo "using lib$ipv6lib"
10618 else
10619 if test $ipv6trylibc = "yes"; then
10620 echo "using libc"
10621 else
10622 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10623 echo "You need to fetch lib$ipv6lib.a from appropriate"
10624 echo 'ipv6 kit and compile beforehand.'
10625 exit 1
10626 fi
10627 fi
10628fi
10629
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10631$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10633/* end confdefs.h. */
10634 /* CAN_RAW_FD_FRAMES available check */
10635#include <linux/can/raw.h>
10636int
10637main ()
10638{
10639int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10640 ;
10641 return 0;
10642}
10643_ACEOF
10644if ac_fn_c_try_compile "$LINENO"; then :
10645
10646
10647$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10648
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10650$as_echo "yes" >&6; }
10651
10652else
10653
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655$as_echo "no" >&6; }
10656
10657fi
10658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10659
Matthias Kloseb9621712010-04-24 17:59:49 +000010660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10661$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010663/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010664
10665 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010666int
10667main ()
10668{
10669FSIORefNum fRef = 0
10670 ;
10671 return 0;
10672}
Matthias Kloseb159a552010-04-25 21:00:44 +000010673
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010675if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010676
Matthias Kloseb159a552010-04-25 21:00:44 +000010677
Matthias Kloseb9621712010-04-24 17:59:49 +000010678$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10681$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010682
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010683else
Matthias Kloseb159a552010-04-25 21:00:44 +000010684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010687
10688fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10690
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010691# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10693$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010696if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697 withval=$with_doc_strings;
10698fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010699
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010700
10701if test -z "$with_doc_strings"
10702then with_doc_strings="yes"
10703fi
10704if test "$with_doc_strings" != "no"
10705then
10706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010708
10709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10711$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010712
Antoine Pitrou042b1282010-08-13 21:15:58 +000010713# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10715$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010718if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010720if test "$withval" != no
10721then
10722
Matthias Kloseb9621712010-04-24 17:59:49 +000010723$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10726$as_echo "yes" >&6; }
10727else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10728$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010729fi
10730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733fi
10734
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010735
10736# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10738$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010741if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742 withval=$with_pymalloc;
10743fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010744
Neil Schemenauera35c6882001-02-27 04:45:05 +000010745
Neil Schemenauer16c22972002-03-22 15:34:49 +000010746if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010747then
10748 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010749fi
10750if test "$with_pymalloc" != "no"
10751then
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Matthias Kloseb9621712010-04-24 17:59:49 +000010753$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010754
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010755 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10758$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010759
Benjamin Peterson05159c42009-12-03 03:01:27 +000010760# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10762$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010763
10764# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010765if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010766 withval=$with_valgrind;
10767else
10768 with_valgrind=no
10769fi
10770
Matthias Kloseb9621712010-04-24 17:59:49 +000010771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10772$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010773if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010774 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 +020010775if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010776
Matthias Kloseb9621712010-04-24 17:59:49 +000010777$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010778
10779else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010780 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010781
10782fi
10783
10784
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010785 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010786fi
10787
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010788# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010789
Guido van Rossum98935bf2001-09-05 19:13:16 +000010790DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010791
Guido van Rossume97ee181999-12-20 21:27:22 +000010792# the dlopen() function means we might want to use dynload_shlib.o. some
10793# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010794for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010795do :
10796 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010797if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010799#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010800_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010801
Guido van Rossume97ee181999-12-20 21:27:22 +000010802fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010803done
Guido van Rossume97ee181999-12-20 21:27:22 +000010804
Michael W. Hudson54241132001-12-07 15:38:26 +000010805
Guido van Rossume97ee181999-12-20 21:27:22 +000010806# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10807# loading of modules.
10808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10810$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010811if test -z "$DYNLOADFILE"
10812then
10813 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010814 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10815 if test "$ac_cv_func_dlopen" = yes
10816 then DYNLOADFILE="dynload_shlib.o"
10817 else DYNLOADFILE="dynload_aix.o"
10818 fi
10819 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010820 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010821 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10822 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010823 *)
10824 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10825 # out any dynamic loading
10826 if test "$ac_cv_func_dlopen" = yes
10827 then DYNLOADFILE="dynload_shlib.o"
10828 else DYNLOADFILE="dynload_stub.o"
10829 fi
10830 ;;
10831 esac
10832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10834$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010835if test "$DYNLOADFILE" != "dynload_stub.o"
10836then
Martin v. Löwis11437992002-04-12 09:54:03 +000010837
Matthias Kloseb9621712010-04-24 17:59:49 +000010838$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010839
10840fi
10841
Neil Schemenauer4e425612001-06-19 15:44:15 +000010842# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10843
Michael W. Hudson54241132001-12-07 15:38:26 +000010844
Matthias Kloseb9621712010-04-24 17:59:49 +000010845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10846$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010847if test -z "$MACHDEP_OBJS"
10848then
Jack Jansene578a632001-08-15 01:27:14 +000010849 MACHDEP_OBJS=$extra_machdep_objs
10850else
10851 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010852fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010853if test -z "$MACHDEP_OBJS"; then
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10855$as_echo "none" >&6; }
10856else
10857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10858$as_echo "$MACHDEP_OBJS" >&6; }
10859fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010860
Guido van Rossum627b2d71993-12-24 10:39:16 +000010861# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010862for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010863 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010864 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010865 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010866 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010867 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010868 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010869 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10870 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010871 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010872 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010873 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010874 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010875 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010876 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010877 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10878 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010879 sigaction sigaltstack siginterrupt sigpending sigrelse \
10880 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010881 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010882 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010883 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010884do :
10885 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10886ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010887if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010888 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010889#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010891
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010892fi
10893done
10894
Michael W. Hudson54241132001-12-07 15:38:26 +000010895
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010896ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10897 #include <dirent.h>
10898"
10899if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10900
10901$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10902
10903fi
10904
10905
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010906# For some functions, having a definition is not sufficient, since
10907# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10909$as_echo_n "checking for chroot... " >&6; }
10910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010911/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010912#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010913int
10914main ()
10915{
10916void *x=chroot
10917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010924
Matthias Kloseb159a552010-04-25 21:00:44 +000010925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010927else
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010930
10931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10934$as_echo_n "checking for link... " >&6; }
10935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010936/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010937#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010938int
10939main ()
10940{
10941void *x=link
10942 ;
10943 return 0;
10944}
10945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010949
Matthias Kloseb159a552010-04-25 21:00:44 +000010950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010952else
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010955
10956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10959$as_echo_n "checking for symlink... " >&6; }
10960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010962#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010963int
10964main ()
10965{
10966void *x=symlink
10967 ;
10968 return 0;
10969}
10970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010974
Matthias Kloseb159a552010-04-25 21:00:44 +000010975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010976$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010977else
Matthias Kloseb9621712010-04-24 17:59:49 +000010978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10979$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010980
10981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10984$as_echo_n "checking for fchdir... " >&6; }
10985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010986/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010987#include <unistd.h>
10988int
10989main ()
10990{
10991void *x=fchdir
10992 ;
10993 return 0;
10994}
10995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010996if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010999
Matthias Kloseb159a552010-04-25 21:00:44 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011001$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011005
11006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11009$as_echo_n "checking for fsync... " >&6; }
11010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011011/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011012#include <unistd.h>
11013int
11014main ()
11015{
11016void *x=fsync
11017 ;
11018 return 0;
11019}
11020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011024
Matthias Kloseb159a552010-04-25 21:00:44 +000011025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011027else
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11029$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011030
11031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11034$as_echo_n "checking for fdatasync... " >&6; }
11035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011037#include <unistd.h>
11038int
11039main ()
11040{
11041void *x=fdatasync
11042 ;
11043 return 0;
11044}
11045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011049
Matthias Kloseb159a552010-04-25 21:00:44 +000011050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011051$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011052else
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11054$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011055
11056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11059$as_echo_n "checking for epoll... " >&6; }
11060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011061/* end confdefs.h. */
11062#include <sys/epoll.h>
11063int
11064main ()
11065{
11066void *x=epoll_create
11067 ;
11068 return 0;
11069}
11070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011071if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011072
Matthias Kloseb9621712010-04-24 17:59:49 +000011073$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011074
Matthias Kloseb159a552010-04-25 21:00:44 +000011075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011077else
Matthias Kloseb9621712010-04-24 17:59:49 +000011078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011080
11081fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11084$as_echo_n "checking for epoll_create1... " >&6; }
11085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11086/* end confdefs.h. */
11087#include <sys/epoll.h>
11088int
11089main ()
11090{
11091void *x=epoll_create1
11092 ;
11093 return 0;
11094}
11095_ACEOF
11096if ac_fn_c_try_compile "$LINENO"; then :
11097
11098$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11099
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11101$as_echo "yes" >&6; }
11102else
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104$as_echo "no" >&6; }
11105
11106fi
11107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11109$as_echo_n "checking for kqueue... " >&6; }
11110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011111/* end confdefs.h. */
11112
11113#include <sys/types.h>
11114#include <sys/event.h>
11115
11116int
11117main ()
11118{
11119int x=kqueue()
11120 ;
11121 return 0;
11122}
11123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011124if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011127
Matthias Kloseb159a552010-04-25 21:00:44 +000011128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011129$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011130else
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11132$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011133
11134fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11137$as_echo_n "checking for prlimit... " >&6; }
11138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11139/* end confdefs.h. */
11140
11141#include <sys/time.h>
11142#include <sys/resource.h>
11143
11144int
11145main ()
11146{
11147void *x=prlimit
11148 ;
11149 return 0;
11150}
11151_ACEOF
11152if ac_fn_c_try_compile "$LINENO"; then :
11153
11154$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11155
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11157$as_echo "yes" >&6; }
11158else
11159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11160$as_echo "no" >&6; }
11161
11162fi
11163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11164
Martin v. Löwisd5843682002-11-21 20:41:28 +000011165# On some systems (eg. FreeBSD 5), we would find a definition of the
11166# functions ctermid_r, setgroups in the library, but no prototype
11167# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11168# address to avoid compiler warnings and potential miscompilations
11169# because of the missing prototypes.
11170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11172$as_echo_n "checking for ctermid_r... " >&6; }
11173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011174/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011175
Martin v. Löwisd5843682002-11-21 20:41:28 +000011176#include <stdio.h>
11177
Martin v. Löwisd5843682002-11-21 20:41:28 +000011178int
11179main ()
11180{
11181void* p = ctermid_r
11182 ;
11183 return 0;
11184}
11185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011187
Matthias Kloseb9621712010-04-24 17:59:49 +000011188$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011189
Matthias Kloseb159a552010-04-25 21:00:44 +000011190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011191$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011192else
Matthias Kloseb9621712010-04-24 17:59:49 +000011193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11194$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011195
11196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11198
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11200$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011201if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011202 $as_echo_n "(cached) " >&6
11203else
11204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011206#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011207int
11208main ()
11209{
11210void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011211
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011212 ;
11213 return 0;
11214}
11215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011216if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011217 ac_cv_flock_decl=yes
11218else
11219 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011220
11221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011223
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011224fi
11225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11226$as_echo "$ac_cv_flock_decl" >&6; }
11227if test "x${ac_cv_flock_decl}" = xyes; then
11228 for ac_func in flock
11229do :
11230 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011231if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011232 cat >>confdefs.h <<_ACEOF
11233#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011234_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011235
Antoine Pitroua3000072010-09-07 14:52:42 +000011236else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011238$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011239if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011240 $as_echo_n "(cached) " >&6
11241else
11242 ac_check_lib_save_LIBS=$LIBS
11243LIBS="-lbsd $LIBS"
11244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11245/* end confdefs.h. */
11246
11247/* Override any GCC internal prototype to avoid an error.
11248 Use char because int might match the return type of a GCC
11249 builtin and then its argument prototype would still apply. */
11250#ifdef __cplusplus
11251extern "C"
11252#endif
11253char flock ();
11254int
11255main ()
11256{
11257return flock ();
11258 ;
11259 return 0;
11260}
11261_ACEOF
11262if ac_fn_c_try_link "$LINENO"; then :
11263 ac_cv_lib_bsd_flock=yes
11264else
11265 ac_cv_lib_bsd_flock=no
11266fi
11267rm -f core conftest.err conftest.$ac_objext \
11268 conftest$ac_exeext conftest.$ac_ext
11269LIBS=$ac_check_lib_save_LIBS
11270fi
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11272$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011273if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011274 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011275
11276
11277$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11278
11279
11280fi
11281
11282
11283fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011284done
11285
Antoine Pitroua3000072010-09-07 14:52:42 +000011286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011287
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11289$as_echo_n "checking for getpagesize... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011291/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011292
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011293#include <unistd.h>
11294
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011295int
11296main ()
11297{
11298void* p = getpagesize
11299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011306
Matthias Kloseb159a552010-04-25 21:00:44 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011309else
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011312
11313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011315
Victor Stinner984890f2011-11-24 13:53:38 +010011316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11317$as_echo_n "checking for broken unsetenv... " >&6; }
11318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11319/* end confdefs.h. */
11320
11321#include <stdlib.h>
11322
11323int
11324main ()
11325{
11326int res = unsetenv("DUMMY")
11327 ;
11328 return 0;
11329}
11330_ACEOF
11331if ac_fn_c_try_compile "$LINENO"; then :
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
11334else
11335
11336$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11337
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11339$as_echo "yes" >&6; }
11340
11341fi
11342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11343
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011344for ac_prog in true
11345do
11346 # Extract the first word of "$ac_prog", so it can be a program name with args.
11347set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11349$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011350if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011352else
11353 if test -n "$TRUE"; then
11354 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11355else
11356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11357for as_dir in $PATH
11358do
11359 IFS=$as_save_IFS
11360 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011363 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011364 $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 +000011365 break 2
11366 fi
11367done
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011370
11371fi
11372fi
11373TRUE=$ac_cv_prog_TRUE
11374if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11376$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011377else
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011380fi
11381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011383 test -n "$TRUE" && break
11384done
11385test -n "$TRUE" || TRUE="/bin/true"
11386
11387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11389$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011390if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011392else
11393 ac_check_lib_save_LIBS=$LIBS
11394LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011396/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398/* Override any GCC internal prototype to avoid an error.
11399 Use char because int might match the return type of a GCC
11400 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011401#ifdef __cplusplus
11402extern "C"
11403#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011404char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011405int
11406main ()
11407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011414 ac_cv_lib_c_inet_aton=yes
11415else
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011418rm -f core conftest.err conftest.$ac_objext \
11419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011420LIBS=$ac_check_lib_save_LIBS
11421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11423$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011424if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011425 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011426else
Matthias Kloseb9621712010-04-24 17:59:49 +000011427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11428$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011429if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011431else
11432 ac_check_lib_save_LIBS=$LIBS
11433LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011435/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437/* Override any GCC internal prototype to avoid an error.
11438 Use char because int might match the return type of a GCC
11439 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011440#ifdef __cplusplus
11441extern "C"
11442#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011443char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011444int
11445main ()
11446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011448 ;
11449 return 0;
11450}
11451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011453 ac_cv_lib_resolv_inet_aton=yes
11454else
Matthias Kloseb9621712010-04-24 17:59:49 +000011455 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011457rm -f core conftest.err conftest.$ac_objext \
11458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011459LIBS=$ac_check_lib_save_LIBS
11460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11462$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011463if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011464 cat >>confdefs.h <<_ACEOF
11465#define HAVE_LIBRESOLV 1
11466_ACEOF
11467
11468 LIBS="-lresolv $LIBS"
11469
11470fi
11471
11472
11473fi
11474
11475
Christian Heimesd0764e22007-12-04 15:00:33 +000011476# On Tru64, chflags seems to be present, but calling it will
11477# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11479$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011480if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011482else
Matthias Kloseb9621712010-04-24 17:59:49 +000011483 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011484 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011485else
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011487/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011488
Christian Heimesd0764e22007-12-04 15:00:33 +000011489#include <sys/stat.h>
11490#include <unistd.h>
11491int main(int argc, char*argv[])
11492{
11493 if(chflags(argv[0], 0) != 0)
11494 return 1;
11495 return 0;
11496}
Ned Deily3eb67d52011-06-28 00:00:28 -070011497
Christian Heimesd0764e22007-12-04 15:00:33 +000011498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011499if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011500 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011501else
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11505 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011506fi
11507
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011508
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11511$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011512if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011513 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011514if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011515 ac_cv_have_chflags="yes"
11516else
11517 ac_cv_have_chflags="no"
11518fi
11519
11520fi
11521if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011524
11525fi
11526
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11528$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011529if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011531else
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011533 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011534else
Matthias Kloseb9621712010-04-24 17:59:49 +000011535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011536/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011537
Christian Heimesd0764e22007-12-04 15:00:33 +000011538#include <sys/stat.h>
11539#include <unistd.h>
11540int main(int argc, char*argv[])
11541{
11542 if(lchflags(argv[0], 0) != 0)
11543 return 1;
11544 return 0;
11545}
Ned Deily3eb67d52011-06-28 00:00:28 -070011546
Christian Heimesd0764e22007-12-04 15:00:33 +000011547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011548if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011549 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011550else
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11554 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011555fi
11556
11557
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11560$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011561if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011563if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011564 ac_cv_have_lchflags="yes"
11565else
11566 ac_cv_have_lchflags="no"
11567fi
11568
11569fi
11570if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011573
11574fi
11575
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011576case $ac_sys_system/$ac_sys_release in
11577Darwin/*)
11578 _CUR_CFLAGS="${CFLAGS}"
11579 _CUR_LDFLAGS="${LDFLAGS}"
11580 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11581 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11582 ;;
11583esac
11584
Matthias Kloseb9621712010-04-24 17:59:49 +000011585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11586$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011587if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011589else
11590 ac_check_lib_save_LIBS=$LIBS
11591LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011593/* end confdefs.h. */
11594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595/* Override any GCC internal prototype to avoid an error.
11596 Use char because int might match the return type of a GCC
11597 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011598#ifdef __cplusplus
11599extern "C"
11600#endif
11601char inflateCopy ();
11602int
11603main ()
11604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011606 ;
11607 return 0;
11608}
11609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011610if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011611 ac_cv_lib_z_inflateCopy=yes
11612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011615rm -f core conftest.err conftest.$ac_objext \
11616 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011617LIBS=$ac_check_lib_save_LIBS
11618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11620$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011621if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011622
Matthias Kloseb9621712010-04-24 17:59:49 +000011623$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011624
11625fi
11626
11627
11628case $ac_sys_system/$ac_sys_release in
11629Darwin/*)
11630 CFLAGS="${_CUR_CFLAGS}"
11631 LDFLAGS="${_CUR_LDFLAGS}"
11632 ;;
11633esac
11634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11636$as_echo_n "checking for hstrerror... " >&6; }
11637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011638/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011639
Martin v. Löwise9416172003-05-03 10:12:45 +000011640#include <netdb.h>
11641
Martin v. Löwise9416172003-05-03 10:12:45 +000011642int
11643main ()
11644{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011645void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011646 ;
11647 return 0;
11648}
11649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011653
Matthias Kloseb159a552010-04-25 21:00:44 +000011654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011655$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011656else
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11658$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011659
11660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011661rm -f core conftest.err conftest.$ac_objext \
11662 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11665$as_echo_n "checking for inet_aton... " >&6; }
11666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011667/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011668
Martin v. Löwis86d66262006-02-17 08:40:11 +000011669#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011670#include <sys/socket.h>
11671#include <netinet/in.h>
11672#include <arpa/inet.h>
11673
Martin v. Löwise9416172003-05-03 10:12:45 +000011674int
11675main ()
11676{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011677void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011678 ;
11679 return 0;
11680}
11681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011685
Matthias Kloseb159a552010-04-25 21:00:44 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011687$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011688else
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011691
11692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011693rm -f core conftest.err conftest.$ac_objext \
11694 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11697$as_echo_n "checking for inet_pton... " >&6; }
11698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011699/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011700
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011701#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011702#include <sys/socket.h>
11703#include <netinet/in.h>
11704#include <arpa/inet.h>
11705
Martin v. Löwise9416172003-05-03 10:12:45 +000011706int
11707main ()
11708{
11709void* p = inet_pton
11710 ;
11711 return 0;
11712}
11713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011714if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011717
Matthias Kloseb159a552010-04-25 21:00:44 +000011718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011719$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11722$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011723
11724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011726
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011727# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11729$as_echo_n "checking for setgroups... " >&6; }
11730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011731/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011732
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011733#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011734#ifdef HAVE_GRP_H
11735#include <grp.h>
11736#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011737
Martin v. Löwisd5843682002-11-21 20:41:28 +000011738int
11739main ()
11740{
11741void* p = setgroups
11742 ;
11743 return 0;
11744}
11745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011747
Matthias Kloseb9621712010-04-24 17:59:49 +000011748$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011749
Matthias Kloseb159a552010-04-25 21:00:44 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011751$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011752else
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11754$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011755
11756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011758
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011759# check for openpty and forkpty
11760
11761for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011762do :
11763 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011764if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011765 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011766#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011767_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011768
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11771$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011772if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011774else
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011776LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011780/* Override any GCC internal prototype to avoid an error.
11781 Use char because int might match the return type of a GCC
11782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011783#ifdef __cplusplus
11784extern "C"
11785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011786char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011787int
11788main ()
11789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 ;
11792 return 0;
11793}
11794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011795if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011797else
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011800rm -f core conftest.err conftest.$ac_objext \
11801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011802LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11805$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011806if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011808 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11811$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011812if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011814else
11815 ac_check_lib_save_LIBS=$LIBS
11816LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011818/* end confdefs.h. */
11819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011820/* Override any GCC internal prototype to avoid an error.
11821 Use char because int might match the return type of a GCC
11822 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011823#ifdef __cplusplus
11824extern "C"
11825#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011826char openpty ();
11827int
11828main ()
11829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011831 ;
11832 return 0;
11833}
11834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011836 ac_cv_lib_bsd_openpty=yes
11837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011840rm -f core conftest.err conftest.$ac_objext \
11841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011842LIBS=$ac_check_lib_save_LIBS
11843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11845$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011846if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011848 LIBS="$LIBS -lbsd"
11849fi
11850
11851
11852fi
11853
Fred Drake8cef4cf2000-06-28 16:40:38 +000011854
11855fi
11856done
11857
11858for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011859do :
11860 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011861if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011863#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011864_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011865
Fred Drake8cef4cf2000-06-28 16:40:38 +000011866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11868$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011871else
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011873LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011877/* Override any GCC internal prototype to avoid an error.
11878 Use char because int might match the return type of a GCC
11879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011880#ifdef __cplusplus
11881extern "C"
11882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011883char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011884int
11885main ()
11886{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011887return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 ;
11889 return 0;
11890}
11891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011892if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011894else
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011897rm -f core conftest.err conftest.$ac_objext \
11898 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011899LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11902$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011903if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011905 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11908$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011909if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011911else
11912 ac_check_lib_save_LIBS=$LIBS
11913LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011915/* end confdefs.h. */
11916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011917/* Override any GCC internal prototype to avoid an error.
11918 Use char because int might match the return type of a GCC
11919 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011920#ifdef __cplusplus
11921extern "C"
11922#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011923char forkpty ();
11924int
11925main ()
11926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011933 ac_cv_lib_bsd_forkpty=yes
11934else
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011937rm -f core conftest.err conftest.$ac_objext \
11938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011939LIBS=$ac_check_lib_save_LIBS
11940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11942$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011943if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011945 LIBS="$LIBS -lbsd"
11946fi
11947
11948
11949fi
11950
Fred Drake8cef4cf2000-06-28 16:40:38 +000011951
11952fi
11953done
11954
Jack Jansendd19cf82001-12-06 22:36:17 +000011955
Christian Heimesb186d002008-03-18 15:15:01 +000011956# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011957for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011958do :
11959 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011960if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011961 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011962#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011963_ACEOF
11964
11965fi
11966done
11967
11968
Michael W. Hudson54241132001-12-07 15:38:26 +000011969# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011970for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011971do :
11972 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11973ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011974if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011976#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011977_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011979fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011980done
11981
Michael W. Hudson54241132001-12-07 15:38:26 +000011982
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011983ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011984if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011985 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011986
Martin v. Löwis1142de32002-03-29 16:28:31 +000011987else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011989 *" dup2.$ac_objext "* ) ;;
11990 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011992esac
11993
Martin v. Löwis1142de32002-03-29 16:28:31 +000011994fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011995
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011996ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011997if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011998 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11999
12000else
12001 case " $LIBOBJS " in
12002 *" strdup.$ac_objext "* ) ;;
12003 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12004 ;;
12005esac
12006
12007fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012008
12009
12010for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012011do :
12012 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012015#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012019#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012020int
12021main ()
12022{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 ;
12025 return 0;
12026}
12027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012029
Matthias Kloseb9621712010-04-24 17:59:49 +000012030$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012031
Guido van Rossum627b2d71993-12-24 10:39:16 +000012032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012034
Guido van Rossum627b2d71993-12-24 10:39:16 +000012035fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012036done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012037
Jack Jansen150753c2003-03-29 22:07:47 +000012038for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012039do :
12040 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012041if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012042 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012043#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012046/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012047#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012048int
12049main ()
12050{
12051setpgrp(0,0);
12052 ;
12053 return 0;
12054}
12055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012056if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012059
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012062
12063fi
12064done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012065
Thomas Wouters3a584202000-08-05 23:28:51 +000012066for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012067do :
12068 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012069if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012070 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012071#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012074/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012075#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012076int
12077main ()
12078{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012079gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 ;
12081 return 0;
12082}
12083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012084if ac_fn_c_try_compile "$LINENO"; then :
12085
Guido van Rossum627b2d71993-12-24 10:39:16 +000012086else
Skip Montanaro6dead952003-09-25 14:50:04 +000012087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012089
Martin v. Löwis11437992002-04-12 09:54:03 +000012090
Guido van Rossum627b2d71993-12-24 10:39:16 +000012091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012093
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012095done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012096
Michael W. Hudson54241132001-12-07 15:38:26 +000012097
Victor Stinnere0be4232011-10-25 13:06:09 +020012098for ac_func in clock_gettime
12099do :
12100 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12101if test "x$ac_cv_func_clock_gettime" = xyes; then :
12102 cat >>confdefs.h <<_ACEOF
12103#define HAVE_CLOCK_GETTIME 1
12104_ACEOF
12105
12106else
12107
12108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12109$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12110if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12111 $as_echo_n "(cached) " >&6
12112else
12113 ac_check_lib_save_LIBS=$LIBS
12114LIBS="-lrt $LIBS"
12115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12116/* end confdefs.h. */
12117
12118/* Override any GCC internal prototype to avoid an error.
12119 Use char because int might match the return type of a GCC
12120 builtin and then its argument prototype would still apply. */
12121#ifdef __cplusplus
12122extern "C"
12123#endif
12124char clock_gettime ();
12125int
12126main ()
12127{
12128return clock_gettime ();
12129 ;
12130 return 0;
12131}
12132_ACEOF
12133if ac_fn_c_try_link "$LINENO"; then :
12134 ac_cv_lib_rt_clock_gettime=yes
12135else
12136 ac_cv_lib_rt_clock_gettime=no
12137fi
12138rm -f core conftest.err conftest.$ac_objext \
12139 conftest$ac_exeext conftest.$ac_ext
12140LIBS=$ac_check_lib_save_LIBS
12141fi
12142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12143$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12144if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12145
Victor Stinner7efb8332014-08-29 15:41:08 +020012146 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012147 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12148
12149
12150$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12151
12152
12153fi
12154
12155
12156fi
12157done
12158
12159
12160for ac_func in clock_getres
12161do :
12162 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12163if test "x$ac_cv_func_clock_getres" = xyes; then :
12164 cat >>confdefs.h <<_ACEOF
12165#define HAVE_CLOCK_GETRES 1
12166_ACEOF
12167
12168else
12169
12170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12171$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12172if ${ac_cv_lib_rt_clock_getres+:} false; then :
12173 $as_echo_n "(cached) " >&6
12174else
12175 ac_check_lib_save_LIBS=$LIBS
12176LIBS="-lrt $LIBS"
12177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12178/* end confdefs.h. */
12179
12180/* Override any GCC internal prototype to avoid an error.
12181 Use char because int might match the return type of a GCC
12182 builtin and then its argument prototype would still apply. */
12183#ifdef __cplusplus
12184extern "C"
12185#endif
12186char clock_getres ();
12187int
12188main ()
12189{
12190return clock_getres ();
12191 ;
12192 return 0;
12193}
12194_ACEOF
12195if ac_fn_c_try_link "$LINENO"; then :
12196 ac_cv_lib_rt_clock_getres=yes
12197else
12198 ac_cv_lib_rt_clock_getres=no
12199fi
12200rm -f core conftest.err conftest.$ac_objext \
12201 conftest$ac_exeext conftest.$ac_ext
12202LIBS=$ac_check_lib_save_LIBS
12203fi
12204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12205$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12206if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12207
12208 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12209
12210
12211fi
12212
12213
12214fi
12215done
12216
12217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12219$as_echo_n "checking for major... " >&6; }
12220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012221/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012222
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012223#if defined(MAJOR_IN_MKDEV)
12224#include <sys/mkdev.h>
12225#elif defined(MAJOR_IN_SYSMACROS)
12226#include <sys/sysmacros.h>
12227#else
12228#include <sys/types.h>
12229#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012230
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012231int
12232main ()
12233{
12234
12235 makedev(major(0),minor(0));
12236
12237 ;
12238 return 0;
12239}
12240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012241if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012242
12243
Matthias Kloseb9621712010-04-24 17:59:49 +000012244$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012245
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12247$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012248
12249else
Skip Montanaro6dead952003-09-25 14:50:04 +000012250
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12252$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012253
12254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012255rm -f core conftest.err conftest.$ac_objext \
12256 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012257
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012258# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012259# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12261$as_echo_n "checking for getaddrinfo... " >&6; }
12262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012263/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012264
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012265#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012266#include <sys/socket.h>
12267#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012268#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269
Martin v. Löwis11437992002-04-12 09:54:03 +000012270int
12271main ()
12272{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012273getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 ;
12275 return 0;
12276}
12277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012279 have_getaddrinfo=yes
12280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012283rm -f core conftest.err conftest.$ac_objext \
12284 conftest$ac_exeext conftest.$ac_ext
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12286$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012287if test $have_getaddrinfo = yes
12288then
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12290$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012291 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012293else
Matthias Kloseb9621712010-04-24 17:59:49 +000012294 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012295
12296if test "${enable_ipv6+set}" = set; then
12297 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12298else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012299 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012300fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012301else
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012303/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012304
Stefan Krah19c21392012-11-22 23:47:32 +010012305#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012306#include <sys/types.h>
12307#include <netdb.h>
12308#include <string.h>
12309#include <sys/socket.h>
12310#include <netinet/in.h>
12311
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012312int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012313{
12314 int passive, gaierr, inet4 = 0, inet6 = 0;
12315 struct addrinfo hints, *ai, *aitop;
12316 char straddr[INET6_ADDRSTRLEN], strport[16];
12317
12318 for (passive = 0; passive <= 1; passive++) {
12319 memset(&hints, 0, sizeof(hints));
12320 hints.ai_family = AF_UNSPEC;
12321 hints.ai_flags = passive ? AI_PASSIVE : 0;
12322 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012323 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012324 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12325 (void)gai_strerror(gaierr);
12326 goto bad;
12327 }
12328 for (ai = aitop; ai; ai = ai->ai_next) {
12329 if (ai->ai_addr == NULL ||
12330 ai->ai_addrlen == 0 ||
12331 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12332 straddr, sizeof(straddr), strport, sizeof(strport),
12333 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12334 goto bad;
12335 }
12336 switch (ai->ai_family) {
12337 case AF_INET:
12338 if (strcmp(strport, "54321") != 0) {
12339 goto bad;
12340 }
12341 if (passive) {
12342 if (strcmp(straddr, "0.0.0.0") != 0) {
12343 goto bad;
12344 }
12345 } else {
12346 if (strcmp(straddr, "127.0.0.1") != 0) {
12347 goto bad;
12348 }
12349 }
12350 inet4++;
12351 break;
12352 case AF_INET6:
12353 if (strcmp(strport, "54321") != 0) {
12354 goto bad;
12355 }
12356 if (passive) {
12357 if (strcmp(straddr, "::") != 0) {
12358 goto bad;
12359 }
12360 } else {
12361 if (strcmp(straddr, "::1") != 0) {
12362 goto bad;
12363 }
12364 }
12365 inet6++;
12366 break;
12367 case AF_UNSPEC:
12368 goto bad;
12369 break;
12370 default:
12371 /* another family support? */
12372 break;
12373 }
12374 }
12375 }
12376
12377 if (!(inet4 == 0 || inet4 == 2))
12378 goto bad;
12379 if (!(inet6 == 0 || inet6 == 2))
12380 goto bad;
12381
12382 if (aitop)
12383 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012384 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385
12386 bad:
12387 if (aitop)
12388 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012389 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012390}
12391
Martin v. Löwis11437992002-04-12 09:54:03 +000012392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012393if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012394 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012395else
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012402fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12407$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12408
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012409if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012410then
12411 if test $ipv6 = yes
12412 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012413 echo 'Fatal: You must get working getaddrinfo() function.'
12414 echo ' or you can specify "--disable-ipv6"'.
12415 exit 1
12416 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012417else
Martin v. Löwis11437992002-04-12 09:54:03 +000012418
Matthias Kloseb9621712010-04-24 17:59:49 +000012419$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012420
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012421fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012422
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012423for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012424do :
12425 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012426if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012428#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012429_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012430
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431fi
12432done
12433
Michael W. Hudson54241132001-12-07 15:38:26 +000012434
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12437$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012438if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440else
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443#include <sys/types.h>
12444#include <sys/time.h>
12445#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Martin v. Löwis11437992002-04-12 09:54:03 +000012447int
12448main ()
12449{
12450if ((struct tm *) 0)
12451return 0;
12452 ;
12453 return 0;
12454}
12455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012457 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12464$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012465if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012466
Matthias Kloseb9621712010-04-24 17:59:49 +000012467$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012468
12469fi
12470
Matthias Kloseb9621712010-04-24 17:59:49 +000012471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12472$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012473if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475else
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478#include <sys/types.h>
12479#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Martin v. Löwis11437992002-04-12 09:54:03 +000012481int
12482main ()
12483{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484struct tm tm;
12485 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 ;
12488 return 0;
12489}
12490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012491if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492 ac_cv_struct_tm=time.h
12493else
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12499$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012500if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012503
12504fi
12505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506ac_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 +000012507#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509"
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
12512cat >>confdefs.h <<_ACEOF
12513#define HAVE_STRUCT_TM_TM_ZONE 1
12514_ACEOF
12515
12516
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012517fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012518
Martin v. Löwis11437992002-04-12 09:54:03 +000012519if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12520
Matthias Kloseb9621712010-04-24 17:59:49 +000012521$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522
12523else
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12525"
Victor Stinnere0be4232011-10-25 13:06:09 +020012526if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528else
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530fi
12531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012533#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534_ACEOF
12535
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12537$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012538if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012543#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544#if !HAVE_DECL_TZNAME
12545extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012546#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
Martin v. Löwis11437992002-04-12 09:54:03 +000012548int
12549main ()
12550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012552 ;
12553 return 0;
12554}
12555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012556if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012557 ac_cv_var_tzname=yes
12558else
Matthias Kloseb9621712010-04-24 17:59:49 +000012559 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012561rm -f core conftest.err conftest.$ac_objext \
12562 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12565$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012566 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012567
Matthias Kloseb9621712010-04-24 17:59:49 +000012568$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012569
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012570 fi
12571fi
12572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573ac_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 +020012574if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012575
12576cat >>confdefs.h <<_ACEOF
12577#define HAVE_STRUCT_STAT_ST_RDEV 1
12578_ACEOF
12579
12580
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012581fi
12582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583ac_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 +020012584if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012585
Martin v. Löwis11437992002-04-12 09:54:03 +000012586cat >>confdefs.h <<_ACEOF
12587#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12588_ACEOF
12589
12590
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012591fi
12592
Matthias Kloseb9621712010-04-24 17:59:49 +000012593ac_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 +020012594if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012595
12596cat >>confdefs.h <<_ACEOF
12597#define HAVE_STRUCT_STAT_ST_FLAGS 1
12598_ACEOF
12599
12600
12601fi
12602
Matthias Kloseb9621712010-04-24 17:59:49 +000012603ac_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 +020012604if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012605
12606cat >>confdefs.h <<_ACEOF
12607#define HAVE_STRUCT_STAT_ST_GEN 1
12608_ACEOF
12609
12610
12611fi
12612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613ac_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 +020012614if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012615
12616cat >>confdefs.h <<_ACEOF
12617#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12618_ACEOF
12619
12620
12621fi
12622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623ac_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 +020012624if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012625
Martin v. Löwis11437992002-04-12 09:54:03 +000012626cat >>confdefs.h <<_ACEOF
12627#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12628_ACEOF
12629
12630
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012631fi
12632
Stefan Krah267b6392016-04-26 01:09:18 +020012633ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12634 #include <sys/types.h>
12635 #include <pwd.h>
12636
12637"
12638if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12639
12640cat >>confdefs.h <<_ACEOF
12641#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12642_ACEOF
12643
12644
12645fi
12646ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12647 #include <sys/types.h>
12648 #include <pwd.h>
12649
12650"
12651if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12652
12653cat >>confdefs.h <<_ACEOF
12654#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12655_ACEOF
12656
12657
12658fi
12659
Michael W. Hudson54241132001-12-07 15:38:26 +000012660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12662$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012663if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012664 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012665else
Matthias Kloseb159a552010-04-25 21:00:44 +000012666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012668/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012669#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012670int
12671main ()
12672{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012673return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 ;
12675 return 0;
12676}
12677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679 ac_cv_header_time_altzone=yes
12680else
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685fi
12686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12688$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012689if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Matthias Kloseb9621712010-04-24 17:59:49 +000012691$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012692
12693fi
12694
Guido van Rossumda88dad1995-01-26 00:46:29 +000012695was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12697$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012699/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012700
12701#include <sys/types.h>
12702#include <sys/select.h>
12703#include <sys/time.h>
12704
Martin v. Löwis11437992002-04-12 09:54:03 +000012705int
12706main ()
12707{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012708;
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ;
12710 return 0;
12711}
12712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012713if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
12715
Matthias Kloseb9621712010-04-24 17:59:49 +000012716$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012717
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012718 was_it_defined=yes
12719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12723$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12726$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012727if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012732#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012733int
12734main ()
12735{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012736struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 ;
12738 return 0;
12739}
12740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012741if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012742 ac_cv_struct_addrinfo=yes
12743else
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12747fi
12748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12750$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012751if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012752
Matthias Kloseb9621712010-04-24 17:59:49 +000012753$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754
12755fi
12756
Matthias Kloseb9621712010-04-24 17:59:49 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12758$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012759if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012761else
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012764
12765# include <sys/types.h>
12766# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012767int
12768main ()
12769{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012770struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 ;
12772 return 0;
12773}
12774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012775if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012776 ac_cv_struct_sockaddr_storage=yes
12777else
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12781fi
12782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12784$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012785if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012786
Matthias Kloseb9621712010-04-24 17:59:49 +000012787$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788
12789fi
12790
Christian Heimesdffa3942016-09-05 23:54:41 +020012791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12792$as_echo_n "checking for sockaddr_alg... " >&6; }
12793if ${ac_cv_struct_sockaddr_alg+:} false; then :
12794 $as_echo_n "(cached) " >&6
12795else
12796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797/* end confdefs.h. */
12798
12799# include <sys/types.h>
12800# include <sys/socket.h>
12801# include <linux/if_alg.h>
12802int
12803main ()
12804{
12805struct sockaddr_alg s
12806 ;
12807 return 0;
12808}
12809_ACEOF
12810if ac_fn_c_try_compile "$LINENO"; then :
12811 ac_cv_struct_sockaddr_alg=yes
12812else
12813 ac_cv_struct_sockaddr_alg=no
12814fi
12815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12816fi
12817
12818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12819$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12820if test $ac_cv_struct_sockaddr_alg = yes; then
12821
12822$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12823
12824fi
12825
Guido van Rossum627b2d71993-12-24 10:39:16 +000012826# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12829$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012830if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012832else
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012836int
12837main ()
12838{
12839static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012840test_array [0] = 0;
12841return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012842
12843 ;
12844 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012845}
Martin v. Löwis11437992002-04-12 09:54:03 +000012846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012847if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012848 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012849else
Matthias Kloseb9621712010-04-24 17:59:49 +000012850 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12855$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012858
12859fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12862$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012863if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012865else
Matthias Kloseb9621712010-04-24 17:59:49 +000012866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012867/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012868
Martin v. Löwis11437992002-04-12 09:54:03 +000012869int
12870main ()
12871{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012872
Martin v. Löwis11437992002-04-12 09:54:03 +000012873#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012874 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012876 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878 char const *const *pcpcc;
12879 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 /* NEC SVR4.0.2 mips cc rejects this. */
12881 struct point {int x, y;};
12882 static struct point const zero = {0,0};
12883 /* AIX XL C 1.02.0.0 rejects this.
12884 It does not let you subtract one const X* pointer from another in
12885 an arm of an if-expression whose if-part is not a constant
12886 expression */
12887 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 ++pcpcc;
12891 ppc = (char**) pcpcc;
12892 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012893 { /* SCO 3.2v4 cc rejects this sort of thing. */
12894 char tx;
12895 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 }
12901 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12902 int x[] = {25, 17};
12903 const int *foo = &x[0];
12904 ++foo;
12905 }
12906 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12907 typedef const int *iptr;
12908 iptr p = 0;
12909 ++p;
12910 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012911 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012913 struct s { int j; const int *ap[3]; } bx;
12914 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 }
12916 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12917 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012921#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012922
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 ;
12924 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012925}
Martin v. Löwis11437992002-04-12 09:54:03 +000012926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012927if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928 ac_cv_c_const=yes
12929else
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12935$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012939
12940fi
12941
Michael W. Hudson54241132001-12-07 15:38:26 +000012942
Guido van Rossumda88dad1995-01-26 00:46:29 +000012943works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12945$as_echo_n "checking for working volatile... " >&6; }
12946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012947/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012948
Martin v. Löwis11437992002-04-12 09:54:03 +000012949int
12950main ()
12951{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012952volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 ;
12954 return 0;
12955}
12956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012958 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012959else
Skip Montanaro6dead952003-09-25 14:50:04 +000012960
Matthias Kloseb9621712010-04-24 17:59:49 +000012961$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012962
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012963
Guido van Rossum627b2d71993-12-24 10:39:16 +000012964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12967$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012968
Guido van Rossumda88dad1995-01-26 00:46:29 +000012969works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12971$as_echo_n "checking for working signed char... " >&6; }
12972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012973/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012974
Martin v. Löwis11437992002-04-12 09:54:03 +000012975int
12976main ()
12977{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ;
12980 return 0;
12981}
12982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012983if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012984 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012985else
Skip Montanaro6dead952003-09-25 14:50:04 +000012986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012988
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012989
Guido van Rossum7f43da71994-08-01 12:15:30 +000012990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12993$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012994
Guido van Rossumda88dad1995-01-26 00:46:29 +000012995have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12997$as_echo_n "checking for prototypes... " >&6; }
12998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012999/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013000int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013001int
13002main ()
13003{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 ;
13006 return 0;
13007}
13008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013009if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013012
Matthias Kloseb159a552010-04-25 21:00:44 +000013013 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13017$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013018
Guido van Rossumda88dad1995-01-26 00:46:29 +000013019works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13021$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013023/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013024
13025#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013026int foo(int x, ...) {
13027 va_list va;
13028 va_start(va, x);
13029 va_arg(va, int);
13030 va_arg(va, char *);
13031 va_arg(va, double);
13032 return 0;
13033}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013034
Martin v. Löwis11437992002-04-12 09:54:03 +000013035int
13036main ()
13037{
Guido van Rossum90eea071996-08-30 20:58:57 +000013038return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 ;
13040 return 0;
13041}
13042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013044
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013047
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013048 works=yes
13049
Guido van Rossum627b2d71993-12-24 10:39:16 +000013050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13053$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013054
Martin v. Löwisd6320502004-08-12 13:45:08 +000013055# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13057$as_echo_n "checking for socketpair... " >&6; }
13058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013059/* end confdefs.h. */
13060
13061#include <sys/types.h>
13062#include <sys/socket.h>
13063
13064int
13065main ()
13066{
13067void *x=socketpair
13068 ;
13069 return 0;
13070}
13071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013075
Matthias Kloseb159a552010-04-25 21:00:44 +000013076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013077$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13080$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013081
13082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013084
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013085# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13087$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013089/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013090#include <sys/types.h>
13091#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013092int
13093main ()
13094{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095struct sockaddr x;
13096x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 ;
13098 return 0;
13099}
13100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013101if ac_fn_c_try_compile "$LINENO"; then :
13102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13103$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013106
13107else
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13109$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013110
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013113
Guido van Rossumda88dad1995-01-26 00:46:29 +000013114va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13116$as_echo_n "checking whether va_list is an array... " >&6; }
13117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013118/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119
13120#ifdef HAVE_STDARG_PROTOTYPES
13121#include <stdarg.h>
13122#else
13123#include <varargs.h>
13124#endif
13125
Martin v. Löwis11437992002-04-12 09:54:03 +000013126int
13127main ()
13128{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013129va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 ;
13131 return 0;
13132}
13133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013134if ac_fn_c_try_compile "$LINENO"; then :
13135
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013136else
Skip Montanaro6dead952003-09-25 14:50:04 +000013137
Martin v. Löwis11437992002-04-12 09:54:03 +000013138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013140
Guido van Rossumda88dad1995-01-26 00:46:29 +000013141 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013142
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13146$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013147
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013148# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013149
13150
Matthias Kloseb9621712010-04-24 17:59:49 +000013151ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013152if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13157$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013158 OLD_CFLAGS=$CFLAGS
13159 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013161/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013162
13163# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013164
Martin v. Löwis11437992002-04-12 09:54:03 +000013165int
13166main ()
13167{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013168
13169 char *name;
13170 struct hostent *he, *res;
13171 char buffer[2048];
13172 int buflen = 2048;
13173 int h_errnop;
13174
13175 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013176
13177 ;
13178 return 0;
13179}
13180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013184
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013187
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13189$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013190
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013191else
Skip Montanaro6dead952003-09-25 14:50:04 +000013192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13194$as_echo "no" >&6; }
13195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13196$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013198/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013199
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013200# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013201
Martin v. Löwis11437992002-04-12 09:54:03 +000013202int
13203main ()
13204{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013205
13206 char *name;
13207 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013208 char buffer[2048];
13209 int buflen = 2048;
13210 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013211
Matthias Kloseb159a552010-04-25 21:00:44 +000013212 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
13214 ;
13215 return 0;
13216}
13217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013221
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
Matthias Kloseb159a552010-04-25 21:00:44 +000013223$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13226$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013227
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013228else
Skip Montanaro6dead952003-09-25 14:50:04 +000013229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13231$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13233$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13235/* end confdefs.h. */
13236
13237# include <netdb.h>
13238
13239int
13240main ()
13241{
13242
13243 char *name;
13244 struct hostent *he;
13245 struct hostent_data data;
13246
13247 (void) gethostbyname_r(name, he, &data);
13248
13249 ;
13250 return 0;
13251}
13252_ACEOF
13253if ac_fn_c_try_compile "$LINENO"; then :
13254
13255 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13256
13257
13258$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13259
13260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13261$as_echo "yes" >&6; }
13262
13263else
13264
13265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13266$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013267
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013270
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013276 CFLAGS=$OLD_CFLAGS
13277
13278else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 for ac_func in gethostbyname
13281do :
13282 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013283if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013285#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013286_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013287
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013288fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013289done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013290
Michael W. Hudson54241132001-12-07 15:38:26 +000013291
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013292fi
13293
Michael W. Hudson54241132001-12-07 15:38:26 +000013294
13295
13296
13297
13298
13299
Guido van Rossum627b2d71993-12-24 10:39:16 +000013300# checks for system services
13301# (none yet)
13302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013304ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013305if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013306
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13309$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013310if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013312else
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013314LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013318/* Override any GCC internal prototype to avoid an error.
13319 Use char because int might match the return type of a GCC
13320 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013321#ifdef __cplusplus
13322extern "C"
13323#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013324char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013325int
13326main ()
13327{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013328return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 ;
13330 return 0;
13331}
13332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013333if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013338rm -f core conftest.err conftest.$ac_objext \
13339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013340LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13343$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013344if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 cat >>confdefs.h <<_ACEOF
13346#define HAVE_LIBIEEE 1
13347_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013349 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013350
Guido van Rossum627b2d71993-12-24 10:39:16 +000013351fi
13352
Michael W. Hudson54241132001-12-07 15:38:26 +000013353
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013354fi
13355
Michael W. Hudson54241132001-12-07 15:38:26 +000013356
Guido van Rossum7f253911997-05-09 02:42:48 +000013357# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13359$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013361# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013362if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013363 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013364if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013365then
13366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13370$as_echo "yes" >&6; }
13371else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13372$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013373fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013374else
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13376$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377fi
13378
Guido van Rossum7f253911997-05-09 02:42:48 +000013379
Guido van Rossum7f43da71994-08-01 12:15:30 +000013380# check for --with-libm=...
13381
Guido van Rossum563e7081996-09-10 18:20:48 +000013382case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013383Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013384*) LIBM=-lm
13385esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13387$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013390if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013392if test "$withval" = no
13393then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13395$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013396elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013397then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13399$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013400else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013401fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13404$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405fi
13406
Guido van Rossum7f43da71994-08-01 12:15:30 +000013407
13408# check for --with-libc=...
13409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13411$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013416if test "$withval" = no
13417then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13419$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013420elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013421then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13423$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013424else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013425fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013426else
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13428$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013429fi
13430
Guido van Rossum7f43da71994-08-01 12:15:30 +000013431
Stefan Krah1919b7e2012-03-21 18:25:23 +010013432# **************************************
13433# * Check for gcc x64 inline assembler *
13434# **************************************
13435
13436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13437$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13439/* end confdefs.h. */
13440
13441int
13442main ()
13443{
13444
13445 __asm__ __volatile__ ("movq %rcx, %rax");
13446
13447 ;
13448 return 0;
13449}
13450_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013451if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013452 have_gcc_asm_for_x64=yes
13453else
13454 have_gcc_asm_for_x64=no
13455fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013456rm -f core conftest.err conftest.$ac_objext \
13457 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13459$as_echo "$have_gcc_asm_for_x64" >&6; }
13460if test "$have_gcc_asm_for_x64" = yes
13461then
13462
13463$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13464
13465fi
13466
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013467# **************************************************
13468# * Check for various properties of floating point *
13469# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13472$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013473if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013475else
13476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013478 ac_cv_little_endian_double=no
13479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013481/* end confdefs.h. */
13482
13483#include <string.h>
13484int main() {
13485 double x = 9006104071832581.0;
13486 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13487 return 0;
13488 else
13489 return 1;
13490}
13491
13492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013493if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013494 ac_cv_little_endian_double=yes
13495else
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013500fi
13501
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013502fi
13503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13505$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013506if test "$ac_cv_little_endian_double" = yes
13507then
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013510
13511fi
13512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13514$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013515if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013517else
13518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013520 ac_cv_big_endian_double=no
13521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013523/* end confdefs.h. */
13524
13525#include <string.h>
13526int main() {
13527 double x = 9006104071832581.0;
13528 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13529 return 0;
13530 else
13531 return 1;
13532}
13533
13534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013535if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013536 ac_cv_big_endian_double=yes
13537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13541 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013542fi
13543
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013544fi
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13547$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013548if test "$ac_cv_big_endian_double" = yes
13549then
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013552
13553fi
13554
13555# Some ARM platforms use a mixed-endian representation for doubles.
13556# While Python doesn't currently have full support for these platforms
13557# (see e.g., issue 1762561), we can at least make sure that float <-> string
13558# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13560$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013561if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013563else
13564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013566 ac_cv_mixed_endian_double=no
13567else
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013569/* end confdefs.h. */
13570
13571#include <string.h>
13572int main() {
13573 double x = 9006104071832581.0;
13574 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13575 return 0;
13576 else
13577 return 1;
13578}
13579
13580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013581if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013582 ac_cv_mixed_endian_double=yes
13583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013588fi
13589
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013590fi
13591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13593$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013594if test "$ac_cv_mixed_endian_double" = yes
13595then
13596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013598
13599fi
13600
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013601# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013602# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013603# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013604# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013605# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013606# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013607
13608# This inline assembler syntax may also work for suncc and icc,
13609# so we try it on all platforms.
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13612$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013614/* end confdefs.h. */
13615
13616int
13617main ()
13618{
13619
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013620 unsigned short cw;
13621 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13622 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013623
13624 ;
13625 return 0;
13626}
13627_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013628if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013629 have_gcc_asm_for_x87=yes
13630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013632fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013633rm -f core conftest.err conftest.$ac_objext \
13634 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13636$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013637if test "$have_gcc_asm_for_x87" = yes
13638then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013641
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013642fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13645$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13647/* end confdefs.h. */
13648
13649int
13650main ()
13651{
13652
13653 unsigned int fpcr;
13654 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13655 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13656
13657 ;
13658 return 0;
13659}
13660_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013661if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013662 have_gcc_asm_for_mc68881=yes
13663else
13664 have_gcc_asm_for_mc68881=no
13665fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013666rm -f core conftest.err conftest.$ac_objext \
13667 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13669$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13670if test "$have_gcc_asm_for_mc68881" = yes
13671then
13672
13673$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13674
13675fi
13676
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013677# Detect whether system arithmetic is subject to x87-style double
13678# rounding issues. The result of this test has little meaning on non
13679# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13680# mode is round-to-nearest and double rounding issues are present, and
13681# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13683$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013684# $BASECFLAGS may affect the result
13685ac_save_cc="$CC"
13686CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013687if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013688 ac_cv_x87_double_rounding=no
13689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013691/* end confdefs.h. */
13692
13693#include <stdlib.h>
13694#include <math.h>
13695int main() {
13696 volatile double x, y, z;
13697 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13698 x = 0.99999999999999989; /* 1-2**-53 */
13699 y = 1./x;
13700 if (y != 1.)
13701 exit(0);
13702 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13703 x = 1e16;
13704 y = 2.99999;
13705 z = x + y;
13706 if (z != 1e16+4.)
13707 exit(0);
13708 /* both tests show evidence of double rounding */
13709 exit(1);
13710}
13711
13712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013714 ac_cv_x87_double_rounding=no
13715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013720fi
13721
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13724$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013725if test "$ac_cv_x87_double_rounding" = yes
13726then
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013729
13730fi
13731
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013732# ************************************
13733# * Check for mathematical functions *
13734# ************************************
13735
13736LIBS_SAVE=$LIBS
13737LIBS="$LIBS $LIBM"
13738
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013739for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13740do :
13741 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13742ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013743if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013744 cat >>confdefs.h <<_ACEOF
13745#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13746_ACEOF
13747
13748fi
13749done
13750
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013751for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013752do :
13753 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13754ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013755if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013756 cat >>confdefs.h <<_ACEOF
13757#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13758_ACEOF
13759
13760fi
13761done
13762
13763ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13764"
Victor Stinnere0be4232011-10-25 13:06:09 +020013765if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013766 ac_have_decl=1
13767else
13768 ac_have_decl=0
13769fi
13770
13771cat >>confdefs.h <<_ACEOF
13772#define HAVE_DECL_ISINF $ac_have_decl
13773_ACEOF
13774ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13775"
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013777 ac_have_decl=1
13778else
13779 ac_have_decl=0
13780fi
13781
13782cat >>confdefs.h <<_ACEOF
13783#define HAVE_DECL_ISNAN $ac_have_decl
13784_ACEOF
13785ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13786"
Victor Stinnere0be4232011-10-25 13:06:09 +020013787if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013788 ac_have_decl=1
13789else
13790 ac_have_decl=0
13791fi
13792
13793cat >>confdefs.h <<_ACEOF
13794#define HAVE_DECL_ISFINITE $ac_have_decl
13795_ACEOF
13796
13797
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013798# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13799# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13801$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013802if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013804else
13805
Matthias Kloseb9621712010-04-24 17:59:49 +000013806if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013807 ac_cv_tanh_preserves_zero_sign=no
13808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013810/* end confdefs.h. */
13811
13812#include <math.h>
13813#include <stdlib.h>
13814int main() {
13815 /* return 0 if either negative zeros don't exist
13816 on this platform or if negative zeros exist
13817 and tanh(-0.) == -0. */
13818 if (atan2(0., -1.) == atan2(-0., -1.) ||
13819 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13820 else exit(1);
13821}
13822
13823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013824if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013825 ac_cv_tanh_preserves_zero_sign=yes
13826else
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013831fi
13832
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013833fi
13834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13836$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013837if test "$ac_cv_tanh_preserves_zero_sign" = yes
13838then
13839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013841
13842fi
13843
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013844if test "$ac_cv_func_log1p" = yes
13845then
13846 # On some versions of AIX, log1p(-0.) returns 0. instead of
13847 # -0. See issue #9920.
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13849$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013850 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013851 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013852else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013853
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013854 if test "$cross_compiling" = yes; then :
13855 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013856else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13858/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013859
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013860 #include <math.h>
13861 #include <stdlib.h>
13862 int main() {
13863 /* Fail if the signs of log1p(-0.) and -0. can be
13864 distinguished. */
13865 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13866 return 0;
13867 else
13868 return 1;
13869 }
13870
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013871_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013872if ac_fn_c_try_run "$LINENO"; then :
13873 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013874else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013875 ac_cv_log1p_drops_zero_sign=yes
13876fi
13877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013879fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013880
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013881fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013882
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13884$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13885fi
13886if test "$ac_cv_log1p_drops_zero_sign" = yes
13887then
13888
13889$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13890
13891fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013892
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013893LIBS=$LIBS_SAVE
13894
Mark Dickinsona614f042009-11-28 12:48:43 +000013895# For multiprocessing module, check that sem_open
13896# actually works. For FreeBSD versions <= 7.2,
13897# the kernel module that provides POSIX semaphores
13898# isn't loaded by default, so an attempt to call
13899# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13901$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013902if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013904else
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013906 ac_cv_posix_semaphores_enabled=yes
13907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013909/* end confdefs.h. */
13910
13911#include <unistd.h>
13912#include <fcntl.h>
13913#include <stdio.h>
13914#include <semaphore.h>
13915#include <sys/stat.h>
13916
13917int main(void) {
13918 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13919 if (a == SEM_FAILED) {
13920 perror("sem_open");
13921 return 1;
13922 }
13923 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013924 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013925 return 0;
13926}
13927
13928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013929if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013930 ac_cv_posix_semaphores_enabled=yes
13931else
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13935 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013936fi
13937
13938
Mark Dickinsona614f042009-11-28 12:48:43 +000013939fi
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13942$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013943if test $ac_cv_posix_semaphores_enabled = no
13944then
13945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013947
13948fi
13949
Mark Dickinson10683072009-04-18 21:18:19 +000013950# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13952$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013953if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013955else
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013957 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013960/* end confdefs.h. */
13961
13962#include <unistd.h>
13963#include <fcntl.h>
13964#include <stdio.h>
13965#include <semaphore.h>
13966#include <sys/stat.h>
13967
13968int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013969 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013970 int count;
13971 int res;
13972 if(a==SEM_FAILED){
13973 perror("sem_open");
13974 return 1;
13975
13976 }
13977 res = sem_getvalue(a, &count);
13978 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013979 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013980 return res==-1 ? 1 : 0;
13981}
13982
Mark Dickinson10683072009-04-18 21:18:19 +000013983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013984if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013985 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013986else
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013991fi
13992
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013993
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013994fi
13995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13997$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013998if test $ac_cv_broken_sem_getvalue = yes
13999then
14000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014002
14003fi
14004
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014005ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14006"
14007if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14008 ac_have_decl=1
14009else
14010 ac_have_decl=0
14011fi
14012
14013cat >>confdefs.h <<_ACEOF
14014#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14015_ACEOF
14016ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14017"
14018if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14019 ac_have_decl=1
14020else
14021 ac_have_decl=0
14022fi
14023
14024cat >>confdefs.h <<_ACEOF
14025#define HAVE_DECL_RTLD_NOW $ac_have_decl
14026_ACEOF
14027ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14028"
14029if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14030 ac_have_decl=1
14031else
14032 ac_have_decl=0
14033fi
14034
14035cat >>confdefs.h <<_ACEOF
14036#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14037_ACEOF
14038ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14039"
14040if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14041 ac_have_decl=1
14042else
14043 ac_have_decl=0
14044fi
14045
14046cat >>confdefs.h <<_ACEOF
14047#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14048_ACEOF
14049ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14050"
14051if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14052 ac_have_decl=1
14053else
14054 ac_have_decl=0
14055fi
14056
14057cat >>confdefs.h <<_ACEOF
14058#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14059_ACEOF
14060ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14061"
14062if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14063 ac_have_decl=1
14064else
14065 ac_have_decl=0
14066fi
14067
14068cat >>confdefs.h <<_ACEOF
14069#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14070_ACEOF
14071ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14072"
14073if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14074 ac_have_decl=1
14075else
14076 ac_have_decl=0
14077fi
14078
14079cat >>confdefs.h <<_ACEOF
14080#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14081_ACEOF
14082
14083
Mark Dickinsonbd792642009-03-18 20:06:12 +000014084# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14086$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014087# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014088if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014089 enableval=$enable_big_digits; case $enable_big_digits in
14090yes)
14091 enable_big_digits=30 ;;
14092no)
14093 enable_big_digits=15 ;;
1409415|30)
14095 ;;
14096*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014097 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 +000014098esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14100$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014101
14102cat >>confdefs.h <<_ACEOF
14103#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14104_ACEOF
14105
14106
14107else
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14109$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014110fi
14111
14112
Guido van Rossumef2255b2000-03-10 22:30:29 +000014113# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014114ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014115if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014116
14117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014119
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014120 wchar_h="yes"
14121
Guido van Rossumef2255b2000-03-10 22:30:29 +000014122else
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014124
14125fi
14126
Michael W. Hudson54241132001-12-07 15:38:26 +000014127
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014129# determine wchar_t size
14130if test "$wchar_h" = yes
14131then
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14134# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14135# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14137$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014138if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014140else
Matthias Kloseb9621712010-04-24 17:59:49 +000014141 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14142"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014143
Martin v. Löwis11437992002-04-12 09:54:03 +000014144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 if test "$ac_cv_type_wchar_t" = yes; then
14146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014148as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014149See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150 else
14151 ac_cv_sizeof_wchar_t=0
14152 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014154
Martin v. Löwis11437992002-04-12 09:54:03 +000014155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14157$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158
14159
14160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014162#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014163_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014164
Michael W. Hudson54241132001-12-07 15:38:26 +000014165
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014166fi
14167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14169$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014170have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014172/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014173
14174#include <tcl.h>
14175#if TCL_UTF_MAX != 6
14176# error "NOT UCS4_TCL"
14177#endif
14178int
14179main ()
14180{
14181
14182 ;
14183 return 0;
14184}
14185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014187
14188
Matthias Kloseb9621712010-04-24 17:59:49 +000014189$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014190
14191 have_ucs4_tcl=yes
14192
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14196$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014197
Skip Montanaro6dead952003-09-25 14:50:04 +000014198# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014199if test "$wchar_h" = yes
14200then
14201 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14203$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014204 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014206else
14207
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014209 ac_cv_wchar_t_signed=yes
14210else
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014212/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014213
14214 #include <wchar.h>
14215 int main()
14216 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014217 /* Success: exit code 0 */
14218 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014219 }
14220
14221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014222if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014223 ac_cv_wchar_t_signed=yes
14224else
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014229fi
14230
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014231fi
14232
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14234$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235fi
14236
Georg Brandl52d168a2008-01-07 18:10:24 +000014237# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014238if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014239 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014240then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014241 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014242
Matthias Kloseb9621712010-04-24 17:59:49 +000014243$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
Georg Brandl52d168a2008-01-07 18:10:24 +000014245else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014246 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014247fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14249$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014250
14251# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14253$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014254if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014256else
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 ac_cv_c_bigendian=unknown
14258 # See if we're dealing with a universal compiler.
14259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14260/* end confdefs.h. */
14261#ifndef __APPLE_CC__
14262 not a universal capable compiler
14263 #endif
14264 typedef int dummy;
14265
Skip Montanaro6dead952003-09-25 14:50:04 +000014266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014267if ac_fn_c_try_compile "$LINENO"; then :
14268
14269 # Check for potential -arch flags. It is not universal unless
14270 # there are at least two -arch flags with different values.
14271 ac_arch=
14272 ac_prev=
14273 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14274 if test -n "$ac_prev"; then
14275 case $ac_word in
14276 i?86 | x86_64 | ppc | ppc64)
14277 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14278 ac_arch=$ac_word
14279 else
14280 ac_cv_c_bigendian=universal
14281 break
14282 fi
14283 ;;
14284 esac
14285 ac_prev=
14286 elif test "x$ac_word" = "x-arch"; then
14287 ac_prev=arch
14288 fi
14289 done
14290fi
14291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14292 if test $ac_cv_c_bigendian = unknown; then
14293 # See if sys/param.h defines the BYTE_ORDER macro.
14294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014295/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014296#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299int
14300main ()
14301{
Matthias Kloseb9621712010-04-24 17:59:49 +000014302#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14303 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14304 && LITTLE_ENDIAN)
14305 bogus endian macros
14306 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014307
14308 ;
14309 return 0;
14310}
14311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014312if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014313 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014315/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014316#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014318
Martin v. Löwis11437992002-04-12 09:54:03 +000014319int
14320main ()
14321{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014322#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 not big endian
14324 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
14326 ;
14327 return 0;
14328}
14329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014330if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014331 ac_cv_c_bigendian=yes
14332else
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014336fi
14337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14338 fi
14339 if test $ac_cv_c_bigendian = unknown; then
14340 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014342/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014343#include <limits.h>
14344
Martin v. Löwis11437992002-04-12 09:54:03 +000014345int
14346main ()
14347{
Matthias Kloseb9621712010-04-24 17:59:49 +000014348#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14349 bogus endian macros
14350 #endif
14351
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 ;
14353 return 0;
14354}
14355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014356if ac_fn_c_try_compile "$LINENO"; then :
14357 # It does; now see whether it defined to _BIG_ENDIAN or not.
14358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14359/* end confdefs.h. */
14360#include <limits.h>
14361
14362int
14363main ()
14364{
14365#ifndef _BIG_ENDIAN
14366 not big endian
14367 #endif
14368
14369 ;
14370 return 0;
14371}
14372_ACEOF
14373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014375else
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14379fi
14380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14381 fi
14382 if test $ac_cv_c_bigendian = unknown; then
14383 # Compile a test program.
14384 if test "$cross_compiling" = yes; then :
14385 # Try to guess by grepping values from an object file.
14386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14387/* end confdefs.h. */
14388short int ascii_mm[] =
14389 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14390 short int ascii_ii[] =
14391 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14392 int use_ascii (int i) {
14393 return ascii_mm[i] + ascii_ii[i];
14394 }
14395 short int ebcdic_ii[] =
14396 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14397 short int ebcdic_mm[] =
14398 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14399 int use_ebcdic (int i) {
14400 return ebcdic_mm[i] + ebcdic_ii[i];
14401 }
14402 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404int
14405main ()
14406{
14407return use_ascii (foo) == use_ebcdic (foo);
14408 ;
14409 return 0;
14410}
14411_ACEOF
14412if ac_fn_c_try_compile "$LINENO"; then :
14413 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14414 ac_cv_c_bigendian=yes
14415 fi
14416 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14417 if test "$ac_cv_c_bigendian" = unknown; then
14418 ac_cv_c_bigendian=no
14419 else
14420 # finding both strings is unlikely to happen, but who knows?
14421 ac_cv_c_bigendian=unknown
14422 fi
14423 fi
14424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014426else
Matthias Kloseb9621712010-04-24 17:59:49 +000014427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014428/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014430int
14431main ()
14432{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 /* Are we little or big endian? From Harbison&Steele. */
14435 union
14436 {
14437 long int l;
14438 char c[sizeof (long int)];
14439 } u;
14440 u.l = 1;
14441 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442
14443 ;
14444 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014445}
Martin v. Löwis11437992002-04-12 09:54:03 +000014446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014447if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014448 ac_cv_c_bigendian=no
14449else
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14453 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14459$as_echo "$ac_cv_c_bigendian" >&6; }
14460 case $ac_cv_c_bigendian in #(
14461 yes)
14462 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14463;; #(
14464 no)
14465 ;; #(
14466 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014467
Matthias Kloseb9621712010-04-24 17:59:49 +000014468$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 ;; #(
14471 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014472 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014473 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014475
Michael W. Hudson54241132001-12-07 15:38:26 +000014476
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014477# ABI version string for Python extension modules. This appears between the
14478# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14479# from the following attributes which affect the ABI of this Python build (in
14480# this order):
14481#
14482# * The Python implementation (always 'cpython-' for us)
14483# * The major and minor version numbers
14484# * --with-pydebug (adds a 'd')
14485# * --with-pymalloc (adds a 'm')
14486# * --with-wide-unicode (adds a 'u')
14487#
14488# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014489# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14490# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014491
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14493$as_echo_n "checking ABIFLAGS... " >&6; }
14494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14495$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14497$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014498SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14500$as_echo "$SOABI" >&6; }
14501
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014502
14503case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014504 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014505 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14506 *)
14507 EXT_SUFFIX=${SHLIB_SUFFIX};;
14508esac
14509
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14511$as_echo_n "checking LDVERSION... " >&6; }
14512LDVERSION='$(VERSION)$(ABIFLAGS)'
14513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14514$as_echo "$LDVERSION" >&6; }
14515
doko@python.org87421192013-01-26 11:39:31 +010014516
doko@ubuntu.com55532312016-06-14 08:55:19 +020014517if test x$PLATFORM_TRIPLET = x; then
14518 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14519else
14520 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14521fi
doko@python.org87421192013-01-26 11:39:31 +010014522
14523
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014524# Check whether right shifting a negative integer extends the sign bit
14525# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14527$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014528if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014533 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014534else
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014536/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014537
14538int main()
14539{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014540 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014541}
14542
Martin v. Löwis11437992002-04-12 09:54:03 +000014543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014544if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014545 ac_cv_rshift_extends_sign=yes
14546else
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014551fi
14552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553fi
14554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14556$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014557if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014558then
Martin v. Löwis11437992002-04-12 09:54:03 +000014559
Matthias Kloseb9621712010-04-24 17:59:49 +000014560$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014561
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014562fi
14563
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014564# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14566$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014567if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014569else
Martin v. Löwis11437992002-04-12 09:54:03 +000014570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014572/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014573#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014574int
14575main ()
14576{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014577
14578 FILE *f = fopen("/dev/null", "r");
14579 flockfile(f);
14580 getc_unlocked(f);
14581 funlockfile(f);
14582
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 ;
14584 return 0;
14585}
14586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014587if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014588 ac_cv_have_getc_unlocked=yes
14589else
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 ac_cv_have_getc_unlocked=no
14591fi
14592rm -f core conftest.err conftest.$ac_objext \
14593 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14597$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014598if test "$ac_cv_have_getc_unlocked" = yes
14599then
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014602
14603fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014604
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014605# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014606# save the value of LIBS so we don't actually link Python with readline
14607LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014608
Gregory P. Smith18820942008-09-07 06:24:49 +000014609# On some systems we need to link readline to a termcap compatible
14610# library. NOTE: Keep the precedence of listed libraries synchronised
14611# with setup.py.
14612py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14614$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014615for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014616 if test -z "$py_libtermcap"; then
14617 READLINE_LIBS="-lreadline"
14618 else
14619 READLINE_LIBS="-lreadline -l$py_libtermcap"
14620 fi
14621 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014623/* end confdefs.h. */
14624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625/* Override any GCC internal prototype to avoid an error.
14626 Use char because int might match the return type of a GCC
14627 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014628#ifdef __cplusplus
14629extern "C"
14630#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014631char readline ();
14632int
14633main ()
14634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014636 ;
14637 return 0;
14638}
14639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014640if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014641 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014643rm -f core conftest.err conftest.$ac_objext \
14644 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014645 if test $py_cv_lib_readline = yes; then
14646 break
14647 fi
14648done
14649# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14650#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014651if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14653$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014654else
Matthias Kloseb9621712010-04-24 17:59:49 +000014655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14656$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014659
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014660fi
14661
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014662# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14664$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014665if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014667else
14668 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014669LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014671/* end confdefs.h. */
14672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014673/* Override any GCC internal prototype to avoid an error.
14674 Use char because int might match the return type of a GCC
14675 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014676#ifdef __cplusplus
14677extern "C"
14678#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014679char rl_callback_handler_install ();
14680int
14681main ()
14682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014684 ;
14685 return 0;
14686}
14687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014688if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014689 ac_cv_lib_readline_rl_callback_handler_install=yes
14690else
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014693rm -f core conftest.err conftest.$ac_objext \
14694 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014695LIBS=$ac_check_lib_save_LIBS
14696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14698$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014699if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014700
Matthias Kloseb9621712010-04-24 17:59:49 +000014701$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014702
14703fi
14704
14705
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014706# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014708/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014709#include <readline/readline.h>
14710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014711if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014712 have_readline=yes
14713else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014714 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014715
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014716fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014717rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014718if test $have_readline = yes
14719then
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014721/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014722#include <readline/readline.h>
14723
14724_ACEOF
14725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014729
14730fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014731rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014734/* end confdefs.h. */
14735#include <readline/readline.h>
14736
14737_ACEOF
14738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014739 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014740
Matthias Kloseb9621712010-04-24 17:59:49 +000014741$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014742
14743fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014744rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014745
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014746fi
14747
Martin v. Löwis0daad592001-09-30 21:09:59 +000014748# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14750$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014751if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014753else
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014755LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759/* Override any GCC internal prototype to avoid an error.
14760 Use char because int might match the return type of a GCC
14761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014762#ifdef __cplusplus
14763extern "C"
14764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014765char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014766int
14767main ()
14768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014770 ;
14771 return 0;
14772}
14773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014776else
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014779rm -f core conftest.err conftest.$ac_objext \
14780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014781LIBS=$ac_check_lib_save_LIBS
14782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14784$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014785if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014786
Matthias Kloseb9621712010-04-24 17:59:49 +000014787$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014788
Martin v. Löwis0daad592001-09-30 21:09:59 +000014789fi
14790
Michael W. Hudson54241132001-12-07 15:38:26 +000014791
Thomas Wouters89d996e2007-09-08 17:39:28 +000014792# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14794$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014795if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014797else
14798 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014799LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014801/* end confdefs.h. */
14802
14803/* Override any GCC internal prototype to avoid an error.
14804 Use char because int might match the return type of a GCC
14805 builtin and then its argument prototype would still apply. */
14806#ifdef __cplusplus
14807extern "C"
14808#endif
14809char rl_completion_display_matches_hook ();
14810int
14811main ()
14812{
14813return rl_completion_display_matches_hook ();
14814 ;
14815 return 0;
14816}
14817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014818if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014819 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14820else
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014823rm -f core conftest.err conftest.$ac_objext \
14824 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014825LIBS=$ac_check_lib_save_LIBS
14826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14828$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014829if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014830
Matthias Kloseb9621712010-04-24 17:59:49 +000014831$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014832
14833fi
14834
14835
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014836# also in 4.0, but not in editline
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14838$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14839if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14840 $as_echo_n "(cached) " >&6
14841else
14842 ac_check_lib_save_LIBS=$LIBS
14843LIBS="-lreadline $READLINE_LIBS $LIBS"
14844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14845/* end confdefs.h. */
14846
14847/* Override any GCC internal prototype to avoid an error.
14848 Use char because int might match the return type of a GCC
14849 builtin and then its argument prototype would still apply. */
14850#ifdef __cplusplus
14851extern "C"
14852#endif
14853char rl_resize_terminal ();
14854int
14855main ()
14856{
14857return rl_resize_terminal ();
14858 ;
14859 return 0;
14860}
14861_ACEOF
14862if ac_fn_c_try_link "$LINENO"; then :
14863 ac_cv_lib_readline_rl_resize_terminal=yes
14864else
14865 ac_cv_lib_readline_rl_resize_terminal=no
14866fi
14867rm -f core conftest.err conftest.$ac_objext \
14868 conftest$ac_exeext conftest.$ac_ext
14869LIBS=$ac_check_lib_save_LIBS
14870fi
14871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14872$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14873if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14874
14875$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14876
14877fi
14878
14879
Martin v. Löwis0daad592001-09-30 21:09:59 +000014880# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14882$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014883if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014885else
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014887LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891/* Override any GCC internal prototype to avoid an error.
14892 Use char because int might match the return type of a GCC
14893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014894#ifdef __cplusplus
14895extern "C"
14896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014897char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014898int
14899main ()
14900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 ;
14903 return 0;
14904}
14905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014906if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014908else
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014911rm -f core conftest.err conftest.$ac_objext \
14912 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014913LIBS=$ac_check_lib_save_LIBS
14914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14916$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014917if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014920
Guido van Rossum353ae582001-07-10 16:45:32 +000014921fi
14922
Jack Jansendd19cf82001-12-06 22:36:17 +000014923
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014924# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014926/* end confdefs.h. */
14927#include <readline/readline.h>
14928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014929if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014930 have_readline=yes
14931else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014932 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014933
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014934fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014935rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014936if test $have_readline = yes
14937then
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014939/* end confdefs.h. */
14940#include <readline/readline.h>
14941
14942_ACEOF
14943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014945
Matthias Kloseb9621712010-04-24 17:59:49 +000014946$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014947
14948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014949rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014950
14951fi
14952
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14954$as_echo_n "checking for append_history in -lreadline... " >&6; }
14955if ${ac_cv_lib_readline_append_history+:} false; then :
14956 $as_echo_n "(cached) " >&6
14957else
14958 ac_check_lib_save_LIBS=$LIBS
14959LIBS="-lreadline $READLINE_LIBS $LIBS"
14960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14961/* end confdefs.h. */
14962
14963/* Override any GCC internal prototype to avoid an error.
14964 Use char because int might match the return type of a GCC
14965 builtin and then its argument prototype would still apply. */
14966#ifdef __cplusplus
14967extern "C"
14968#endif
14969char append_history ();
14970int
14971main ()
14972{
14973return append_history ();
14974 ;
14975 return 0;
14976}
14977_ACEOF
14978if ac_fn_c_try_link "$LINENO"; then :
14979 ac_cv_lib_readline_append_history=yes
14980else
14981 ac_cv_lib_readline_append_history=no
14982fi
14983rm -f core conftest.err conftest.$ac_objext \
14984 conftest$ac_exeext conftest.$ac_ext
14985LIBS=$ac_check_lib_save_LIBS
14986fi
14987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14988$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14989if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14990
14991$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14992
14993fi
14994
14995
Martin v. Löwis82bca632006-02-10 20:49:30 +000014996# End of readline checks: restore LIBS
14997LIBS=$LIBS_no_readline
14998
Matthias Kloseb9621712010-04-24 17:59:49 +000014999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15000$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015001if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015003else
Martin v. Löwis11437992002-04-12 09:54:03 +000015004
Matthias Kloseb9621712010-04-24 17:59:49 +000015005if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015006 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015007else
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015009/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015010
15011int main()
15012{
15013 int val1 = nice(1);
15014 if (val1 != -1 && val1 == nice(2))
15015 exit(0);
15016 exit(1);
15017}
15018
Martin v. Löwis11437992002-04-12 09:54:03 +000015019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015020if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015021 ac_cv_broken_nice=yes
15022else
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15026 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015027fi
15028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015029fi
15030
Matthias Kloseb9621712010-04-24 17:59:49 +000015031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15032$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015033if test "$ac_cv_broken_nice" = yes
15034then
Martin v. Löwis11437992002-04-12 09:54:03 +000015035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015037
15038fi
15039
Matthias Kloseb9621712010-04-24 17:59:49 +000015040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15041$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015042if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015044else
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015046 ac_cv_broken_poll=no
15047else
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015049/* end confdefs.h. */
15050
15051#include <poll.h>
15052
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015053int main()
15054{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015055 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015056 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015057
15058 close (42);
15059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015060 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015061 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015062 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015063 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015064 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015065 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015066 return 1;
15067}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015068
15069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015070if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015071 ac_cv_broken_poll=yes
15072else
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15076 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015079fi
15080
Matthias Kloseb9621712010-04-24 17:59:49 +000015081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15082$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015083if test "$ac_cv_broken_poll" = yes
15084then
15085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015087
15088fi
15089
Brett Cannon43802422005-02-10 20:48:03 +000015090# 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 +000015091# (which is not required by ISO C or UNIX spec) and/or if we support
15092# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015093ac_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 +000015094#include <$ac_cv_struct_tm>
15095
Matthias Kloseb9621712010-04-24 17:59:49 +000015096"
Victor Stinnere0be4232011-10-25 13:06:09 +020015097if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015098
15099cat >>confdefs.h <<_ACEOF
15100#define HAVE_STRUCT_TM_TM_ZONE 1
15101_ACEOF
15102
15103
15104fi
15105
15106if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15107
Matthias Kloseb9621712010-04-24 17:59:49 +000015108$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015109
15110else
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15112"
Victor Stinnere0be4232011-10-25 13:06:09 +020015113if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015114 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115else
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117fi
15118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015120#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121_ACEOF
15122
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15124$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015125if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127else
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015129/* end confdefs.h. */
15130#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131#if !HAVE_DECL_TZNAME
15132extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015133#endif
15134
15135int
15136main ()
15137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015139 ;
15140 return 0;
15141}
15142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015143if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015144 ac_cv_var_tzname=yes
15145else
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015148rm -f core conftest.err conftest.$ac_objext \
15149 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15152$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015153 if test $ac_cv_var_tzname = yes; then
15154
Matthias Kloseb9621712010-04-24 17:59:49 +000015155$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015156
15157 fi
15158fi
15159
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015160
Martin v. Löwis1d459062005-03-14 21:23:33 +000015161# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15163$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015164if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015166else
15167
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015169 ac_cv_working_tzset=no
15170else
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015172/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015173
15174#include <stdlib.h>
15175#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015176#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015177
15178#if HAVE_TZNAME
15179extern char *tzname[];
15180#endif
15181
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015182int main()
15183{
Brett Cannon18367812003-09-19 00:59:16 +000015184 /* Note that we need to ensure that not only does tzset(3)
15185 do 'something' with localtime, but it works as documented
15186 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015187 This includes making sure that tzname is set properly if
15188 tm->tm_zone does not exist since it is the alternative way
15189 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015190
15191 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015192 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015193 */
15194
Martin v. Löwis1d459062005-03-14 21:23:33 +000015195 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015196 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15197
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015198 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015199 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015200 if (localtime(&groundhogday)->tm_hour != 0)
15201 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015202#if HAVE_TZNAME
15203 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15204 if (strcmp(tzname[0], "UTC") ||
15205 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15206 exit(1);
15207#endif
Brett Cannon18367812003-09-19 00:59:16 +000015208
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015209 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015210 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015211 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015212 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015213#if HAVE_TZNAME
15214 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15215 exit(1);
15216#endif
Brett Cannon18367812003-09-19 00:59:16 +000015217
15218 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15219 tzset();
15220 if (localtime(&groundhogday)->tm_hour != 11)
15221 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015222#if HAVE_TZNAME
15223 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15224 exit(1);
15225#endif
15226
15227#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015228 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15229 exit(1);
15230 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15231 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015232#endif
Brett Cannon18367812003-09-19 00:59:16 +000015233
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015234 exit(0);
15235}
15236
15237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015238if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015239 ac_cv_working_tzset=yes
15240else
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15244 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015245fi
15246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247fi
15248
Matthias Kloseb9621712010-04-24 17:59:49 +000015249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15250$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015251if test "$ac_cv_working_tzset" = yes
15252then
15253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015255
15256fi
15257
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015258# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15260$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015261if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015262 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015263else
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015265/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015266#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015267int
15268main ()
15269{
15270
15271struct stat st;
15272st.st_mtim.tv_nsec = 1;
15273
15274 ;
15275 return 0;
15276}
15277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015279 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015280else
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15284fi
15285
Matthias Kloseb9621712010-04-24 17:59:49 +000015286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15287$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015288if test "$ac_cv_stat_tv_nsec" = yes
15289then
15290
Matthias Kloseb9621712010-04-24 17:59:49 +000015291$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015292
15293fi
15294
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015295# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15297$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015298if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015299 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015300else
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015302/* end confdefs.h. */
15303#include <sys/stat.h>
15304int
15305main ()
15306{
15307
15308struct stat st;
15309st.st_mtimespec.tv_nsec = 1;
15310
15311 ;
15312 return 0;
15313}
15314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015316 ac_cv_stat_tv_nsec2=yes
15317else
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15321fi
15322
Matthias Kloseb9621712010-04-24 17:59:49 +000015323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15324$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015325if test "$ac_cv_stat_tv_nsec2" = yes
15326then
15327
Matthias Kloseb9621712010-04-24 17:59:49 +000015328$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015329
15330fi
15331
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015332# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015333ac_save_cppflags="$CPPFLAGS"
15334CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015335
15336for ac_header in curses.h ncurses.h
15337do :
15338 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15339ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15340if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15341 cat >>confdefs.h <<_ACEOF
15342#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15343_ACEOF
15344
15345fi
15346
15347done
15348
15349
15350# On Solaris, term.h requires curses.h
15351for ac_header in term.h
15352do :
15353 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15354#ifdef HAVE_CURSES_H
15355#include <curses.h>
15356#endif
15357
15358"
15359if test "x$ac_cv_header_term_h" = xyes; then :
15360 cat >>confdefs.h <<_ACEOF
15361#define HAVE_TERM_H 1
15362_ACEOF
15363
15364fi
15365
15366done
15367
15368
Jack Jansen666b1e72001-10-31 12:11:48 +000015369# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15371$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015372if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015374else
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015376/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015377#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015378int
15379main ()
15380{
Jack Jansen666b1e72001-10-31 12:11:48 +000015381
15382 int rtn;
15383 rtn = mvwdelch(0,0,0);
15384
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 ;
15386 return 0;
15387}
15388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015389if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015390 ac_cv_mvwdelch_is_expression=yes
15391else
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15395fi
15396
Matthias Kloseb9621712010-04-24 17:59:49 +000015397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15398$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015399
15400if test "$ac_cv_mvwdelch_is_expression" = yes
15401then
Martin v. Löwis11437992002-04-12 09:54:03 +000015402
Matthias Kloseb9621712010-04-24 17:59:49 +000015403$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015404
15405fi
15406
Matthias Kloseb9621712010-04-24 17:59:49 +000015407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15408$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015409if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015411else
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015413/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015414#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015415int
15416main ()
15417{
Jack Jansen666b1e72001-10-31 12:11:48 +000015418
15419 WINDOW *w;
15420 w->_flags = 0;
15421
Martin v. Löwis11437992002-04-12 09:54:03 +000015422 ;
15423 return 0;
15424}
15425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015426if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015427 ac_cv_window_has_flags=yes
15428else
Matthias Kloseb9621712010-04-24 17:59:49 +000015429 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15432fi
15433
Matthias Kloseb9621712010-04-24 17:59:49 +000015434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15435$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015436
Jack Jansen666b1e72001-10-31 12:11:48 +000015437
15438if test "$ac_cv_window_has_flags" = yes
15439then
Martin v. Löwis11437992002-04-12 09:54:03 +000015440
Matthias Kloseb9621712010-04-24 17:59:49 +000015441$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015442
15443fi
15444
Matthias Kloseb9621712010-04-24 17:59:49 +000015445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15446$as_echo_n "checking for is_term_resized... " >&6; }
15447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015448/* end confdefs.h. */
15449#include <curses.h>
15450int
15451main ()
15452{
15453void *x=is_term_resized
15454 ;
15455 return 0;
15456}
15457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015459
Matthias Kloseb9621712010-04-24 17:59:49 +000015460$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015461
Matthias Kloseb159a552010-04-25 21:00:44 +000015462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015463$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015464else
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15466$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015467
15468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15470
Matthias Kloseb9621712010-04-24 17:59:49 +000015471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15472$as_echo_n "checking for resize_term... " >&6; }
15473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015474/* end confdefs.h. */
15475#include <curses.h>
15476int
15477main ()
15478{
15479void *x=resize_term
15480 ;
15481 return 0;
15482}
15483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015484if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015485
Matthias Kloseb9621712010-04-24 17:59:49 +000015486$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015487
Matthias Kloseb159a552010-04-25 21:00:44 +000015488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015489$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015490else
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15492$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015493
15494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15498$as_echo_n "checking for resizeterm... " >&6; }
15499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015500/* end confdefs.h. */
15501#include <curses.h>
15502int
15503main ()
15504{
15505void *x=resizeterm
15506 ;
15507 return 0;
15508}
15509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015510if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015511
Matthias Kloseb9621712010-04-24 17:59:49 +000015512$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015513
Matthias Kloseb159a552010-04-25 21:00:44 +000015514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015515$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15518$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015519
15520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015522# last curses configure check
15523CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15526$as_echo "$as_me: checking for device files" >&6;}
15527
15528if test "x$cross_compiling" = xyes; then
15529 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15531$as_echo_n "checking for /dev/ptmx... " >&6; }
15532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15533$as_echo "not set" >&6; }
15534 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15535 fi
15536 if test "${ac_cv_file__dev_ptc+set}" != set; then
15537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15538$as_echo_n "checking for /dev/ptc... " >&6; }
15539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15540$as_echo "not set" >&6; }
15541 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15542 fi
15543fi
15544
Matthias Kloseb9621712010-04-24 17:59:49 +000015545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15546$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015547if ${ac_cv_file__dev_ptmx+:} false; then :
15548 $as_echo_n "(cached) " >&6
15549else
15550 test "$cross_compiling" = yes &&
15551 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15552if test -r "/dev/ptmx"; then
15553 ac_cv_file__dev_ptmx=yes
15554else
15555 ac_cv_file__dev_ptmx=no
15556fi
15557fi
15558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15559$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15560if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015561
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015562fi
15563
15564if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015565
Matthias Kloseb9621712010-04-24 17:59:49 +000015566$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015567
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15570$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015571if ${ac_cv_file__dev_ptc+:} false; then :
15572 $as_echo_n "(cached) " >&6
15573else
15574 test "$cross_compiling" = yes &&
15575 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15576if test -r "/dev/ptc"; then
15577 ac_cv_file__dev_ptc=yes
15578else
15579 ac_cv_file__dev_ptc=no
15580fi
15581fi
15582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15583$as_echo "$ac_cv_file__dev_ptc" >&6; }
15584if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015585
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015586fi
15587
15588if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015589
Matthias Kloseb9621712010-04-24 17:59:49 +000015590$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015591
Neal Norwitz865400f2003-03-21 01:42:58 +000015592fi
15593
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015595$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015596if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015598else
Matthias Kloseb9621712010-04-24 17:59:49 +000015599 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015600 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015601if test x$GCC = xyes; then
15602save_CFLAGS=$CFLAGS
15603CFLAGS="$CFLAGS -Werror -Wformat"
15604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015605/* end confdefs.h. */
15606
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015607#include <stdio.h>
15608#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015609
15610int
15611main ()
15612{
15613
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015614char *buffer;
15615sprintf(buffer, "%lld", (long long)123);
15616sprintf(buffer, "%lld", (long long)-123);
15617sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015618
15619 ;
15620 return 0;
15621}
15622_ACEOF
15623if ac_fn_c_try_compile "$LINENO"; then :
15624 ac_cv_have_long_long_format=yes
15625
15626fi
15627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015628CFLAGS=$save_CFLAGS
15629fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015632/* end confdefs.h. */
15633
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015634#include <stdio.h>
15635#include <stddef.h>
15636#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015637
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015638#ifdef HAVE_SYS_TYPES_H
15639#include <sys/types.h>
15640#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015641
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015642int main()
15643{
15644char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015645
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015646if (sprintf(buffer, "%lld", (long long)123) < 0)
15647return 1;
15648if (strcmp(buffer, "123"))
15649return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015650
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015651if (sprintf(buffer, "%lld", (long long)-123) < 0)
15652return 1;
15653if (strcmp(buffer, "-123"))
15654return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015655
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015656if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15657return 1;
15658if (strcmp(buffer, "123"))
15659return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015660
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015661return 0;
15662}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015663
15664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015665if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015666 ac_cv_have_long_long_format=yes
15667else
Matthias Kloseb9621712010-04-24 17:59:49 +000015668 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015672fi
15673
15674
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015675fi
15676
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015678$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015679
Mark Dickinson89d7d412009-12-31 20:50:59 +000015680if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015681then
15682
Matthias Kloseb9621712010-04-24 17:59:49 +000015683$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015684
15685fi
15686
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015687if test $ac_sys_system = Darwin
15688then
15689 LIBS="$LIBS -framework CoreFoundation"
15690fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015691
Matthias Kloseb9621712010-04-24 17:59:49 +000015692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15693$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015694if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015698 ac_cv_have_size_t_format="cross -- assuming yes"
15699
Thomas Wouters477c8d52006-05-27 19:21:47 +000015700else
Matthias Kloseb9621712010-04-24 17:59:49 +000015701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015702/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015703
Thomas Wouters477c8d52006-05-27 19:21:47 +000015704#include <stdio.h>
15705#include <stddef.h>
15706#include <string.h>
15707
Christian Heimes2c181612007-12-17 20:04:13 +000015708#ifdef HAVE_SYS_TYPES_H
15709#include <sys/types.h>
15710#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015711
15712#ifdef HAVE_SSIZE_T
15713typedef ssize_t Py_ssize_t;
15714#elif SIZEOF_VOID_P == SIZEOF_LONG
15715typedef long Py_ssize_t;
15716#else
15717typedef int Py_ssize_t;
15718#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015719
Christian Heimes2c181612007-12-17 20:04:13 +000015720int main()
15721{
15722 char buffer[256];
15723
Thomas Wouters477c8d52006-05-27 19:21:47 +000015724 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15725 return 1;
15726
Thomas Wouters89f507f2006-12-13 04:49:30 +000015727 if (strcmp(buffer, "123"))
15728 return 1;
15729
15730 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15731 return 1;
15732
15733 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015734 return 1;
15735
15736 return 0;
15737}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015738
Thomas Wouters477c8d52006-05-27 19:21:47 +000015739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015740if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015741 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015742else
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015747fi
15748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15751$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015752if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015755
15756fi
15757
Matthias Kloseb9621712010-04-24 17:59:49 +000015758ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015759#ifdef HAVE_SYS_TYPES_H
15760#include <sys/types.h>
15761#endif
15762#ifdef HAVE_SYS_SOCKET_H
15763#include <sys/socket.h>
15764#endif
15765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766"
Victor Stinnere0be4232011-10-25 13:06:09 +020015767if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015768
Martin v. Löwis11437992002-04-12 09:54:03 +000015769else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015770
Matthias Kloseb9621712010-04-24 17:59:49 +000015771$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015772
15773fi
15774
Michael W. Hudson54241132001-12-07 15:38:26 +000015775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15777$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015778if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015780else
Matthias Kloseb9621712010-04-24 17:59:49 +000015781 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015782 ac_cv_broken_mbstowcs=no
15783else
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015785/* end confdefs.h. */
15786
Stefan Krah19c21392012-11-22 23:47:32 +010015787#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015788#include<stdlib.h>
15789int main() {
15790 size_t len = -1;
15791 const char *str = "text";
15792 len = mbstowcs(NULL, str, 0);
15793 return (len != 4);
15794}
15795
15796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015797if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015798 ac_cv_broken_mbstowcs=no
15799else
Matthias Kloseb9621712010-04-24 17:59:49 +000015800 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015804fi
15805
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015806fi
15807
Matthias Kloseb9621712010-04-24 17:59:49 +000015808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15809$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015810if test "$ac_cv_broken_mbstowcs" = yes
15811then
15812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015814
15815fi
15816
Antoine Pitroub52ec782009-01-25 16:34:23 +000015817# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15819$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015820
15821# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015822if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015823 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015824if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015825then
15826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15830$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015831fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015832if test "$withval" = no
15833then
15834
15835$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15838$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015839fi
15840
Antoine Pitrou042b1282010-08-13 21:15:58 +000015841else
15842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15843$as_echo "no value specified" >&6; }
15844fi
15845
Antoine Pitroub52ec782009-01-25 16:34:23 +000015846
Matthias Kloseb17289e2012-03-15 19:51:34 +010015847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15848$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15849if ${ac_cv_computed_gotos+:} false; then :
15850 $as_echo_n "(cached) " >&6
15851else
15852 if test "$cross_compiling" = yes; then :
15853 if test "${with_computed_gotos+set}" = set; then
15854 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15855 else
15856 ac_cv_computed_gotos=no
15857 fi
15858else
15859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15860/* end confdefs.h. */
15861
15862int main(int argc, char **argv)
15863{
15864 static void *targets[1] = { &&LABEL1 };
15865 goto LABEL2;
15866LABEL1:
15867 return 0;
15868LABEL2:
15869 goto *targets[0];
15870 return 1;
15871}
15872
15873_ACEOF
15874if ac_fn_c_try_run "$LINENO"; then :
15875 ac_cv_computed_gotos=yes
15876else
15877 ac_cv_computed_gotos=no
15878fi
15879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15880 conftest.$ac_objext conftest.beam conftest.$ac_ext
15881fi
15882
15883fi
15884
15885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15886$as_echo "$ac_cv_computed_gotos" >&6; }
15887case "$ac_cv_computed_gotos" in yes*)
15888
15889$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15890
15891esac
15892
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015893case $ac_sys_system in
15894AIX*)
15895
15896$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15897 ;;
15898esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015899
Michael W. Hudson54241132001-12-07 15:38:26 +000015900
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015901
15902
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015903for h in `(cd $srcdir;echo Python/thread_*.h)`
15904do
15905 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15906done
15907
Michael W. Hudson54241132001-12-07 15:38:26 +000015908
Ned Deily0db50cf2014-07-25 12:41:31 -070015909SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15911$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015912for dir in $SRCDIRS; do
15913 if test ! -d $dir; then
15914 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015915 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015916done
Matthias Kloseb9621712010-04-24 17:59:49 +000015917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15918$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015919
Stefan Krah1919b7e2012-03-21 18:25:23 +010015920# Availability of -O2:
15921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15922$as_echo_n "checking for -O2... " >&6; }
15923saved_cflags="$CFLAGS"
15924CFLAGS="-O2"
15925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15926/* end confdefs.h. */
15927
15928int
15929main ()
15930{
15931
15932
15933 ;
15934 return 0;
15935}
15936_ACEOF
15937if ac_fn_c_try_compile "$LINENO"; then :
15938 have_O2=yes
15939else
15940 have_O2=no
15941fi
15942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15944$as_echo "$have_O2" >&6; }
15945CFLAGS="$saved_cflags"
15946
15947# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15948# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15950$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15951saved_cflags="$CFLAGS"
15952CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15953if test "$have_O2" = no; then
15954 CFLAGS=""
15955fi
15956if test "$cross_compiling" = yes; then :
15957 have_glibc_memmove_bug=undefined
15958else
15959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15960/* end confdefs.h. */
15961
15962#include <stdio.h>
15963#include <stdlib.h>
15964#include <string.h>
15965void foo(void *p, void *q) { memmove(p, q, 19); }
15966int main() {
15967 char a[32] = "123456789000000000";
15968 foo(&a[9], a);
15969 if (strcmp(a, "123456789123456789000000000") != 0)
15970 return 1;
15971 foo(a, &a[9]);
15972 if (strcmp(a, "123456789000000000") != 0)
15973 return 1;
15974 return 0;
15975}
15976
15977_ACEOF
15978if ac_fn_c_try_run "$LINENO"; then :
15979 have_glibc_memmove_bug=no
15980else
15981 have_glibc_memmove_bug=yes
15982fi
15983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15984 conftest.$ac_objext conftest.beam conftest.$ac_ext
15985fi
15986
15987CFLAGS="$saved_cflags"
15988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15989$as_echo "$have_glibc_memmove_bug" >&6; }
15990if test "$have_glibc_memmove_bug" = yes; then
15991
15992$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15993
15994fi
15995
15996if test "$have_gcc_asm_for_x87" = yes; then
15997 # Some versions of gcc miscompile inline asm:
15998 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15999 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16000 case $CC in
16001 *gcc*)
16002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16003$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16004 saved_cflags="$CFLAGS"
16005 CFLAGS="-O2"
16006 if test "$cross_compiling" = yes; then :
16007 have_ipa_pure_const_bug=undefined
16008else
16009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010/* end confdefs.h. */
16011
16012 __attribute__((noinline)) int
16013 foo(int *p) {
16014 int r;
16015 asm ( "movl \$6, (%1)\n\t"
16016 "xorl %0, %0\n\t"
16017 : "=r" (r) : "r" (p) : "memory"
16018 );
16019 return r;
16020 }
16021 int main() {
16022 int p = 8;
16023 if ((foo(&p) ? : p) != 6)
16024 return 1;
16025 return 0;
16026 }
16027
16028_ACEOF
16029if ac_fn_c_try_run "$LINENO"; then :
16030 have_ipa_pure_const_bug=no
16031else
16032 have_ipa_pure_const_bug=yes
16033fi
16034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16035 conftest.$ac_objext conftest.beam conftest.$ac_ext
16036fi
16037
16038 CFLAGS="$saved_cflags"
16039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16040$as_echo "$have_ipa_pure_const_bug" >&6; }
16041 if test "$have_ipa_pure_const_bug" = yes; then
16042
16043$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16044
16045 fi
16046 ;;
16047 esac
16048fi
16049
Victor Stinner4f5366e2015-01-09 02:13:19 +010016050# Check for stdatomic.h
16051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16052$as_echo_n "checking for stdatomic.h... " >&6; }
16053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16054/* end confdefs.h. */
16055
16056
16057 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016058 atomic_int value = ATOMIC_VAR_INIT(1);
16059 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016060 int main() {
16061 int loaded_value = atomic_load(&value);
16062 return 0;
16063 }
16064
16065
16066_ACEOF
16067if ac_fn_c_try_link "$LINENO"; then :
16068 have_stdatomic_h=yes
16069else
16070 have_stdatomic_h=no
16071fi
16072rm -f core conftest.err conftest.$ac_objext \
16073 conftest$ac_exeext conftest.$ac_ext
16074
16075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16076$as_echo "$have_stdatomic_h" >&6; }
16077
16078if test "$have_stdatomic_h" = yes; then
16079
16080$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16081
16082fi
16083
16084# Check for GCC >= 4.7 __atomic builtins
16085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16086$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16088/* end confdefs.h. */
16089
16090
16091 volatile int val = 1;
16092 int main() {
16093 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16094 return 0;
16095 }
16096
16097
16098_ACEOF
16099if ac_fn_c_try_link "$LINENO"; then :
16100 have_builtin_atomic=yes
16101else
16102 have_builtin_atomic=no
16103fi
16104rm -f core conftest.err conftest.$ac_objext \
16105 conftest$ac_exeext conftest.$ac_ext
16106
16107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16108$as_echo "$have_builtin_atomic" >&6; }
16109
16110if test "$have_builtin_atomic" = yes; then
16111
16112$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16113
16114fi
16115
Ned Deily322f5ba2013-11-21 23:01:59 -080016116# ensurepip option
16117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16118$as_echo_n "checking for ensurepip... " >&6; }
16119
16120# Check whether --with-ensurepip was given.
16121if test "${with_ensurepip+set}" = set; then :
16122 withval=$with_ensurepip;
16123else
16124 with_ensurepip=upgrade
16125fi
16126
16127case $with_ensurepip in #(
16128 yes|upgrade) :
16129 ENSUREPIP=upgrade ;; #(
16130 install) :
16131 ENSUREPIP=install ;; #(
16132 no) :
16133 ENSUREPIP=no ;; #(
16134 *) :
16135 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16136esac
16137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16138$as_echo "$ENSUREPIP" >&6; }
16139
16140
Victor Stinner35a97c02015-03-08 02:59:09 +010016141# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16143$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16145/* end confdefs.h. */
16146
16147
16148 #include <dirent.h>
16149
16150 int main() {
16151 struct dirent entry;
16152 return entry.d_type == DT_UNKNOWN;
16153 }
16154
16155
16156_ACEOF
16157if ac_fn_c_try_link "$LINENO"; then :
16158 have_dirent_d_type=yes
16159else
16160 have_dirent_d_type=no
16161fi
16162rm -f core conftest.err conftest.$ac_objext \
16163 conftest$ac_exeext conftest.$ac_ext
16164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16165$as_echo "$have_dirent_d_type" >&6; }
16166
16167if test "$have_dirent_d_type" = yes; then
16168
16169$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16170
16171fi
16172
Victor Stinner9eb57c52015-03-19 22:21:49 +010016173# check if the Linux getrandom() syscall is available
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16175$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16177/* end confdefs.h. */
16178
16179
Victor Stinner1b80b242016-04-12 22:34:58 +020016180 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016181 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016182 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016183
16184 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016185 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016186 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016187 const int flags = GRND_NONBLOCK;
16188 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016189 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016190 return 0;
16191 }
16192
16193
16194_ACEOF
16195if ac_fn_c_try_link "$LINENO"; then :
16196 have_getrandom_syscall=yes
16197else
16198 have_getrandom_syscall=no
16199fi
16200rm -f core conftest.err conftest.$ac_objext \
16201 conftest$ac_exeext conftest.$ac_ext
16202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16203$as_echo "$have_getrandom_syscall" >&6; }
16204
16205if test "$have_getrandom_syscall" = yes; then
16206
16207$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16208
16209fi
16210
Victor Stinner3abf44e2015-09-18 15:38:37 +020016211# check if the getrandom() function is available
16212# the test was written for the Solaris function of <sys/random.h>
16213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16214$as_echo_n "checking for the getrandom() function... " >&6; }
16215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16216/* end confdefs.h. */
16217
16218
16219 #include <sys/random.h>
16220
16221 int main() {
16222 char buffer[1];
16223 const size_t buflen = sizeof(buffer);
16224 const int flags = 0;
16225 /* ignore the result, Python checks for ENOSYS at runtime */
16226 (void)getrandom(buffer, buflen, flags);
16227 return 0;
16228 }
16229
16230
16231_ACEOF
16232if ac_fn_c_try_link "$LINENO"; then :
16233 have_getrandom=yes
16234else
16235 have_getrandom=no
16236fi
16237rm -f core conftest.err conftest.$ac_objext \
16238 conftest$ac_exeext conftest.$ac_ext
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16240$as_echo "$have_getrandom" >&6; }
16241
16242if test "$have_getrandom" = yes; then
16243
16244$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16245
16246fi
16247
Guido van Rossum627b2d71993-12-24 10:39:16 +000016248# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016249ac_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 +000016250
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016251ac_config_files="$ac_config_files Modules/ld_so_aix"
16252
Martin v. Löwis11437992002-04-12 09:54:03 +000016253cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016254# This file is a shell script that caches the results of configure
16255# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016256# scripts and configure runs, see configure's option --config-cache.
16257# It is not useful on other systems. If it contains results you don't
16258# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016259#
Martin v. Löwis11437992002-04-12 09:54:03 +000016260# config.status only pays attention to the cache file if you give it
16261# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016262#
Skip Montanaro6dead952003-09-25 14:50:04 +000016263# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016264# loading this file, other *unset* `ac_cv_foo' will be assigned the
16265# following values.
16266
16267_ACEOF
16268
Guido van Rossumf78abae1997-01-21 22:02:36 +000016269# The following way of writing the cache mishandles newlines in values,
16270# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016272# Ultrix sh set writes to stderr and can't be redirected directly,
16273# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274(
16275 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16276 eval ac_val=\$$ac_var
16277 case $ac_val in #(
16278 *${as_nl}*)
16279 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016280 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16281$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 esac
16283 case $ac_var in #(
16284 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016285 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16286 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287 esac ;;
16288 esac
16289 done
16290
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16293 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016294 # `set' does not quote correctly, so add quotes: double-quote
16295 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016297 "s/'/'\\\\''/g;
16298 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 *)
16301 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 esac |
16305 sort
16306) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016307 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016309 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016311 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16312 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16314 :end' >>confcache
16315if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16316 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016317 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016318 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16319$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016320 if test ! -f "$cache_file" || test -h "$cache_file"; then
16321 cat confcache >"$cache_file"
16322 else
16323 case $cache_file in #(
16324 */* | ?:*)
16325 mv -f confcache "$cache_file"$$ &&
16326 mv -f "$cache_file"$$ "$cache_file" ;; #(
16327 *)
16328 mv -f confcache "$cache_file" ;;
16329 esac
16330 fi
16331 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016332 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016333 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16334$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016335 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016336fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016337rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016338
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016339test "x$prefix" = xNONE && prefix=$ac_default_prefix
16340# Let make expand exec_prefix.
16341test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016342
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016343DEFS=-DHAVE_CONFIG_H
16344
Skip Montanaro6dead952003-09-25 14:50:04 +000016345ac_libobjs=
16346ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016347U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016348for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16349 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016350 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016351 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016352 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16353 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016354 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16355 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016356done
16357LIBOBJS=$ac_libobjs
16358
16359LTLIBOBJS=$ac_ltlibobjs
16360
16361
Martin v. Löwis11437992002-04-12 09:54:03 +000016362
Matthias Kloseb9621712010-04-24 17:59:49 +000016363
Victor Stinnere0be4232011-10-25 13:06:09 +020016364: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016365ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016366ac_clean_files_save=$ac_clean_files
16367ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016368{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16369$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16370as_write_fail=0
16371cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016372#! $SHELL
16373# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016374# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016375# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016376# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016377
Martin v. Löwis11437992002-04-12 09:54:03 +000016378debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016379ac_cs_recheck=false
16380ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016381
Matthias Kloseb9621712010-04-24 17:59:49 +000016382SHELL=\${CONFIG_SHELL-$SHELL}
16383export SHELL
16384_ASEOF
16385cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16386## -------------------- ##
16387## M4sh Initialization. ##
16388## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390# Be more Bourne compatible
16391DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016392if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 emulate sh
16394 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016395 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016396 # is contrary to our usage. Disable this feature.
16397 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016398 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016399else
Matthias Kloseb9621712010-04-24 17:59:49 +000016400 case `(set -o) 2>/dev/null` in #(
16401 *posix*) :
16402 set -o posix ;; #(
16403 *) :
16404 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016405esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016406fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016407
16408
Matthias Kloseb9621712010-04-24 17:59:49 +000016409as_nl='
16410'
16411export as_nl
16412# Printing a long string crashes Solaris 7 /usr/bin/printf.
16413as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16414as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16415as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16416# Prefer a ksh shell builtin over an external printf program on Solaris,
16417# but without wasting forks for bash or zsh.
16418if test -z "$BASH_VERSION$ZSH_VERSION" \
16419 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16420 as_echo='print -r --'
16421 as_echo_n='print -rn --'
16422elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16423 as_echo='printf %s\n'
16424 as_echo_n='printf %s'
16425else
16426 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16427 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16428 as_echo_n='/usr/ucb/echo -n'
16429 else
16430 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16431 as_echo_n_body='eval
16432 arg=$1;
16433 case $arg in #(
16434 *"$as_nl"*)
16435 expr "X$arg" : "X\\(.*\\)$as_nl";
16436 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16437 esac;
16438 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16439 '
16440 export as_echo_n_body
16441 as_echo_n='sh -c $as_echo_n_body as_echo'
16442 fi
16443 export as_echo_body
16444 as_echo='sh -c $as_echo_body as_echo'
16445fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016446
16447# The user is always right.
16448if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016449 PATH_SEPARATOR=:
16450 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16451 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16452 PATH_SEPARATOR=';'
16453 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016456
16457# IFS
16458# We need space, tab and new line, in precisely that order. Quoting is
16459# there to prevent editors from complaining about space-tab.
16460# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16461# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016462IFS=" "" $as_nl"
16463
16464# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016465as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016466case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016467 *[\\/]* ) as_myself=$0 ;;
16468 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016469for as_dir in $PATH
16470do
16471 IFS=$as_save_IFS
16472 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016473 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16474 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016475IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016477 ;;
16478esac
16479# We did not find ourselves, most probably we were run as `sh COMMAND'
16480# in which case we are not to be found in the path.
16481if test "x$as_myself" = x; then
16482 as_myself=$0
16483fi
16484if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016485 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16486 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487fi
16488
Matthias Kloseb9621712010-04-24 17:59:49 +000016489# Unset variables that we do not need and which cause bugs (e.g. in
16490# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16491# suppresses any "Segmentation fault" message there. '((' could
16492# trigger a bug in pdksh 5.2.14.
16493for as_var in BASH_ENV ENV MAIL MAILPATH
16494do eval test x\${$as_var+set} = xset \
16495 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496done
16497PS1='$ '
16498PS2='> '
16499PS4='+ '
16500
16501# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016502LC_ALL=C
16503export LC_ALL
16504LANGUAGE=C
16505export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506
Matthias Kloseb9621712010-04-24 17:59:49 +000016507# CDPATH.
16508(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16509
16510
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016511# as_fn_error STATUS ERROR [LINENO LOG_FD]
16512# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016513# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16514# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016515# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016516as_fn_error ()
16517{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016518 as_status=$1; test $as_status -eq 0 && as_status=1
16519 if test "$4"; then
16520 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16521 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016522 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016523 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016524 as_fn_exit $as_status
16525} # as_fn_error
16526
16527
16528# as_fn_set_status STATUS
16529# -----------------------
16530# Set $? to STATUS, without forking.
16531as_fn_set_status ()
16532{
16533 return $1
16534} # as_fn_set_status
16535
16536# as_fn_exit STATUS
16537# -----------------
16538# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16539as_fn_exit ()
16540{
16541 set +e
16542 as_fn_set_status $1
16543 exit $1
16544} # as_fn_exit
16545
16546# as_fn_unset VAR
16547# ---------------
16548# Portably unset VAR.
16549as_fn_unset ()
16550{
16551 { eval $1=; unset $1;}
16552}
16553as_unset=as_fn_unset
16554# as_fn_append VAR VALUE
16555# ----------------------
16556# Append the text in VALUE to the end of the definition contained in VAR. Take
16557# advantage of any shell optimizations that allow amortized linear growth over
16558# repeated appends, instead of the typical quadratic growth present in naive
16559# implementations.
16560if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16561 eval 'as_fn_append ()
16562 {
16563 eval $1+=\$2
16564 }'
16565else
16566 as_fn_append ()
16567 {
16568 eval $1=\$$1\$2
16569 }
16570fi # as_fn_append
16571
16572# as_fn_arith ARG...
16573# ------------------
16574# Perform arithmetic evaluation on the ARGs, and store the result in the
16575# global $as_val. Take advantage of shells that can avoid forks. The arguments
16576# must be portable across $(()) and expr.
16577if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16578 eval 'as_fn_arith ()
16579 {
16580 as_val=$(( $* ))
16581 }'
16582else
16583 as_fn_arith ()
16584 {
16585 as_val=`expr "$@" || test $? -eq 1`
16586 }
16587fi # as_fn_arith
16588
16589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016590if expr a : '\(a\)' >/dev/null 2>&1 &&
16591 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16592 as_expr=expr
16593else
16594 as_expr=false
16595fi
16596
16597if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16598 as_basename=basename
16599else
16600 as_basename=false
16601fi
16602
Matthias Kloseb9621712010-04-24 17:59:49 +000016603if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16604 as_dirname=dirname
16605else
16606 as_dirname=false
16607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609as_me=`$as_basename -- "$0" ||
16610$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16611 X"$0" : 'X\(//\)$' \| \
16612 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016613$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 sed '/^.*\/\([^/][^/]*\)\/*$/{
16615 s//\1/
16616 q
16617 }
16618 /^X\/\(\/\/\)$/{
16619 s//\1/
16620 q
16621 }
16622 /^X\/\(\/\).*/{
16623 s//\1/
16624 q
16625 }
16626 s/.*/./; q'`
16627
Matthias Kloseb9621712010-04-24 17:59:49 +000016628# Avoid depending upon Character Ranges.
16629as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16630as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16631as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16632as_cr_digits='0123456789'
16633as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634
16635ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016636case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016638 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016640 xy) ECHO_C='\c';;
16641 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16642 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643 esac;;
16644*)
16645 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016646esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016647
Martin v. Löwis11437992002-04-12 09:54:03 +000016648rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649if test -d conf$$.dir; then
16650 rm -f conf$$.dir/conf$$.file
16651else
16652 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016653 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016655if (echo >conf$$.file) 2>/dev/null; then
16656 if ln -s conf$$.file conf$$ 2>/dev/null; then
16657 as_ln_s='ln -s'
16658 # ... but there are two gotchas:
16659 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16660 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016661 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016662 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016663 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016664 elif ln conf$$.file conf$$ 2>/dev/null; then
16665 as_ln_s=ln
16666 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016667 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016669else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016670 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16673rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016674
Matthias Kloseb9621712010-04-24 17:59:49 +000016675
16676# as_fn_mkdir_p
16677# -------------
16678# Create "$as_dir" as a directory, including parents if necessary.
16679as_fn_mkdir_p ()
16680{
16681
16682 case $as_dir in #(
16683 -*) as_dir=./$as_dir;;
16684 esac
16685 test -d "$as_dir" || eval $as_mkdir_p || {
16686 as_dirs=
16687 while :; do
16688 case $as_dir in #(
16689 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16690 *) as_qdir=$as_dir;;
16691 esac
16692 as_dirs="'$as_qdir' $as_dirs"
16693 as_dir=`$as_dirname -- "$as_dir" ||
16694$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16695 X"$as_dir" : 'X\(//\)[^/]' \| \
16696 X"$as_dir" : 'X\(//\)$' \| \
16697 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16698$as_echo X"$as_dir" |
16699 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16700 s//\1/
16701 q
16702 }
16703 /^X\(\/\/\)[^/].*/{
16704 s//\1/
16705 q
16706 }
16707 /^X\(\/\/\)$/{
16708 s//\1/
16709 q
16710 }
16711 /^X\(\/\).*/{
16712 s//\1/
16713 q
16714 }
16715 s/.*/./; q'`
16716 test -d "$as_dir" && break
16717 done
16718 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016719 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016720
16721
16722} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016723if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016724 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016725else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016726 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016727 as_mkdir_p=false
16728fi
16729
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016730
16731# as_fn_executable_p FILE
16732# -----------------------
16733# Test if FILE is an executable regular file.
16734as_fn_executable_p ()
16735{
16736 test -f "$1" && test -x "$1"
16737} # as_fn_executable_p
16738as_test_x='test -x'
16739as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016740
16741# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016742as_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 +000016743
16744# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016745as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016746
16747
Martin v. Löwis11437992002-04-12 09:54:03 +000016748exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016749## ----------------------------------- ##
16750## Main body of $CONFIG_STATUS script. ##
16751## ----------------------------------- ##
16752_ASEOF
16753test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016754
Matthias Kloseb9621712010-04-24 17:59:49 +000016755cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16756# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016757# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016758# values after options handling.
16759ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016760This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016761generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016762
16763 CONFIG_FILES = $CONFIG_FILES
16764 CONFIG_HEADERS = $CONFIG_HEADERS
16765 CONFIG_LINKS = $CONFIG_LINKS
16766 CONFIG_COMMANDS = $CONFIG_COMMANDS
16767 $ $0 $@
16768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016769on `(hostname || uname -n) 2>/dev/null | sed 1q`
16770"
16771
Martin v. Löwis11437992002-04-12 09:54:03 +000016772_ACEOF
16773
Matthias Kloseb9621712010-04-24 17:59:49 +000016774case $ac_config_files in *"
16775"*) set x $ac_config_files; shift; ac_config_files=$*;;
16776esac
16777
16778case $ac_config_headers in *"
16779"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16780esac
16781
16782
16783cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016784# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016785config_files="$ac_config_files"
16786config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016788_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016789
Matthias Kloseb9621712010-04-24 17:59:49 +000016790cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016791ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016792\`$as_me' instantiates files and other configuration actions
16793from templates according to the current configuration. Unless the files
16794and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016795
Matthias Kloseb9621712010-04-24 17:59:49 +000016796Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
16798 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016799 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016800 --config print configuration, then exit
16801 -q, --quiet, --silent
16802 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 -d, --debug don't remove temporary files
16804 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016805 --file=FILE[:TEMPLATE]
16806 instantiate the configuration file FILE
16807 --header=FILE[:TEMPLATE]
16808 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016809
16810Configuration files:
16811$config_files
16812
16813Configuration headers:
16814$config_headers
16815
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016816Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16820ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016821ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016822python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016823configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016824 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016825
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016826Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016827This config.status script is free software; the Free Software Foundation
16828gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829
16830ac_pwd='$ac_pwd'
16831srcdir='$srcdir'
16832INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016833MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016834test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016835_ACEOF
16836
Matthias Kloseb9621712010-04-24 17:59:49 +000016837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16838# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016839ac_need_defaults=:
16840while test $# != 0
16841do
16842 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016843 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016844 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16845 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016846 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016847 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016848 --*=)
16849 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16850 ac_optarg=
16851 ac_shift=:
16852 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016854 ac_option=$1
16855 ac_optarg=$2
16856 ac_shift=shift
16857 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016858 esac
16859
Skip Montanaro6dead952003-09-25 14:50:04 +000016860 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016861 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016862 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16863 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016864 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016865 $as_echo "$ac_cs_version"; exit ;;
16866 --config | --confi | --conf | --con | --co | --c )
16867 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016869 debug=: ;;
16870 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016871 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016872 case $ac_optarg in
16873 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016874 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016875 esac
16876 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016877 ac_need_defaults=false;;
16878 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016879 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 case $ac_optarg in
16881 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16882 esac
16883 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016884 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885 --he | --h)
16886 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016887 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016888Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016889 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016890 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016891 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16892 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16893 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016894
16895 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016896 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016897Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016898
Matthias Kloseb9621712010-04-24 17:59:49 +000016899 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016901
16902 esac
16903 shift
16904done
16905
Skip Montanaro6dead952003-09-25 14:50:04 +000016906ac_configure_extra_args=
16907
16908if $ac_cs_silent; then
16909 exec 6>/dev/null
16910 ac_configure_extra_args="$ac_configure_extra_args --silent"
16911fi
16912
16913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016915if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016916 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016917 shift
16918 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16919 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016921 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016922fi
16923
Martin v. Löwis11437992002-04-12 09:54:03 +000016924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016926exec 5>>config.log
16927{
16928 echo
16929 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16930## Running $as_me. ##
16931_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016932 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016933} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016937_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016938
Matthias Kloseb9621712010-04-24 17:59:49 +000016939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016940
16941# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016942for ac_config_target in $ac_config_targets
16943do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016944 case $ac_config_target in
16945 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16946 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16947 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016948 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16949 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016950 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16951 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016952 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016953 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016954 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955
Victor Stinnere0be4232011-10-25 13:06:09 +020016956 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016957 esac
16958done
16959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960
Martin v. Löwis11437992002-04-12 09:54:03 +000016961# If the user did not use the arguments to specify the items to instantiate,
16962# then the envvar interface is used. Set only those that are not.
16963# We use the long form for the default assignment because of an extremely
16964# bizarre bug on SunOS 4.1.3.
16965if $ac_need_defaults; then
16966 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16967 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16968fi
16969
Skip Montanaro6dead952003-09-25 14:50:04 +000016970# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016971# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016972# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016973# Hook for its removal unless debugging.
16974# Note that there is a small window in which the directory will not be cleaned:
16975# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016976$debug ||
16977{
Victor Stinnere0be4232011-10-25 13:06:09 +020016978 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016979 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016980 : "${ac_tmp:=$tmp}"
16981 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016983 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016984}
Martin v. Löwis11437992002-04-12 09:54:03 +000016985# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016986
Martin v. Löwis11437992002-04-12 09:54:03 +000016987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016989 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016990} ||
16991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992 tmp=./conf$$-$RANDOM
16993 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016994} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016995ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016996
Matthias Kloseb9621712010-04-24 17:59:49 +000016997# Set up the scripts for CONFIG_FILES section.
16998# No need to generate them if there are no CONFIG_FILES.
16999# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017001
Matthias Kloseb9621712010-04-24 17:59:49 +000017002
17003ac_cr=`echo X | tr X '\015'`
17004# On cygwin, bash can eat \r inside `` if the user requested igncr.
17005# But we know of no other shell where ac_cr would be empty at this
17006# point, so we can use a bashism as a fallback.
17007if test "x$ac_cr" = x; then
17008 eval ac_cr=\$\'\\r\'
17009fi
17010ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17011if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017012 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017013else
17014 ac_cs_awk_cr=$ac_cr
17015fi
17016
Victor Stinnere0be4232011-10-25 13:06:09 +020017017echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017018_ACEOF
17019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020
Matthias Kloseb9621712010-04-24 17:59:49 +000017021{
17022 echo "cat >conf$$subs.awk <<_ACEOF" &&
17023 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17024 echo "_ACEOF"
17025} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017026 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17027ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028ac_delim='%!_!# '
17029for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017030 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017031 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017032
Matthias Kloseb9621712010-04-24 17:59:49 +000017033 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17034 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035 break
17036 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017037 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038 else
17039 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017040 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017041done
Matthias Kloseb9621712010-04-24 17:59:49 +000017042rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043
Matthias Kloseb9621712010-04-24 17:59:49 +000017044cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017045cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017047sed -n '
17048h
17049s/^/S["/; s/!.*/"]=/
17050p
17051g
17052s/^[^!]*!//
17053:repl
17054t repl
17055s/'"$ac_delim"'$//
17056t delim
17057:nl
17058h
17059s/\(.\{148\}\)..*/\1/
17060t more1
17061s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17062p
17063n
17064b repl
17065:more1
17066s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17067p
17068g
17069s/.\{148\}//
17070t nl
17071:delim
17072h
17073s/\(.\{148\}\)..*/\1/
17074t more2
17075s/["\\]/\\&/g; s/^/"/; s/$/"/
17076p
17077b
17078:more2
17079s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17080p
17081g
17082s/.\{148\}//
17083t delim
17084' <conf$$subs.awk | sed '
17085/^[^""]/{
17086 N
17087 s/\n//
17088}
17089' >>$CONFIG_STATUS || ac_write_fail=1
17090rm -f conf$$subs.awk
17091cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17092_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017093cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017094 for (key in S) S_is_set[key] = 1
17095 FS = ""
17096
17097}
17098{
17099 line = $ 0
17100 nfields = split(line, field, "@")
17101 substed = 0
17102 len = length(field[1])
17103 for (i = 2; i < nfields; i++) {
17104 key = field[i]
17105 keylen = length(key)
17106 if (S_is_set[key]) {
17107 value = S[key]
17108 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17109 len += length(value) + length(field[++i])
17110 substed = 1
17111 } else
17112 len += 1 + keylen
17113 }
17114
17115 print line
17116}
17117
17118_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17121if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17122 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17123else
17124 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017125fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017126 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017127_ACEOF
17128
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017129# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17130# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017131# trailing colons and then remove the whole line if VPATH becomes empty
17132# (actually we leave an empty line to preserve line numbers).
17133if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017134 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17135h
17136s///
17137s/^/:/
17138s/[ ]*$/:/
17139s/:\$(srcdir):/:/g
17140s/:\${srcdir}:/:/g
17141s/:@srcdir@:/:/g
17142s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017143s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017144x
17145s/\(=[ ]*\).*/\1/
17146G
17147s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017148s/^[^=]*=[ ]*$//
17149}'
17150fi
17151
Matthias Kloseb9621712010-04-24 17:59:49 +000017152cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017153fi # test -n "$CONFIG_FILES"
17154
Matthias Kloseb9621712010-04-24 17:59:49 +000017155# Set up the scripts for CONFIG_HEADERS section.
17156# No need to generate them if there are no CONFIG_HEADERS.
17157# This happens for instance with `./config.status Makefile'.
17158if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017159cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017160BEGIN {
17161_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162
Matthias Kloseb9621712010-04-24 17:59:49 +000017163# Transform confdefs.h into an awk script `defines.awk', embedded as
17164# here-document in config.status, that substitutes the proper values into
17165# config.h.in to produce config.h.
17166
17167# Create a delimiter string that does not exist in confdefs.h, to ease
17168# handling of long lines.
17169ac_delim='%!_!# '
17170for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017171 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17172 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017173 break
17174 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017175 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017176 else
17177 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17178 fi
17179done
17180
17181# For the awk script, D is an array of macro values keyed by name,
17182# likewise P contains macro parameters if any. Preserve backslash
17183# newline sequences.
17184
17185ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17186sed -n '
17187s/.\{148\}/&'"$ac_delim"'/g
17188t rset
17189:rset
17190s/^[ ]*#[ ]*define[ ][ ]*/ /
17191t def
17192d
17193:def
17194s/\\$//
17195t bsnl
17196s/["\\]/\\&/g
17197s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17198D["\1"]=" \3"/p
17199s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17200d
17201:bsnl
17202s/["\\]/\\&/g
17203s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17204D["\1"]=" \3\\\\\\n"\\/p
17205t cont
17206s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17207t cont
17208d
17209:cont
17210n
17211s/.\{148\}/&'"$ac_delim"'/g
17212t clear
17213:clear
17214s/\\$//
17215t bsnlc
17216s/["\\]/\\&/g; s/^/"/; s/$/"/p
17217d
17218:bsnlc
17219s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17220b cont
17221' <confdefs.h | sed '
17222s/'"$ac_delim"'/"\\\
17223"/g' >>$CONFIG_STATUS || ac_write_fail=1
17224
17225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17226 for (key in D) D_is_set[key] = 1
17227 FS = ""
17228}
17229/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17230 line = \$ 0
17231 split(line, arg, " ")
17232 if (arg[1] == "#") {
17233 defundef = arg[2]
17234 mac1 = arg[3]
17235 } else {
17236 defundef = substr(arg[1], 2)
17237 mac1 = arg[2]
17238 }
17239 split(mac1, mac2, "(") #)
17240 macro = mac2[1]
17241 prefix = substr(line, 1, index(line, defundef) - 1)
17242 if (D_is_set[macro]) {
17243 # Preserve the white space surrounding the "#".
17244 print prefix "define", macro P[macro] D[macro]
17245 next
17246 } else {
17247 # Replace #undef with comments. This is necessary, for example,
17248 # in the case of _POSIX_SOURCE, which is predefined and required
17249 # on some systems where configure will not decide to define it.
17250 if (defundef == "undef") {
17251 print "/*", prefix defundef, macro, "*/"
17252 next
17253 }
17254 }
17255}
17256{ print }
17257_ACAWK
17258_ACEOF
17259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017260 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017261fi # test -n "$CONFIG_HEADERS"
17262
17263
17264eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17265shift
17266for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267do
17268 case $ac_tag in
17269 :[FHLC]) ac_mode=$ac_tag; continue;;
17270 esac
17271 case $ac_mode$ac_tag in
17272 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017273 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274 :[FH]-) ac_tag=-:-;;
17275 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17276 esac
17277 ac_save_IFS=$IFS
17278 IFS=:
17279 set x $ac_tag
17280 IFS=$ac_save_IFS
17281 shift
17282 ac_file=$1
17283 shift
17284
17285 case $ac_mode in
17286 :L) ac_source=$1;;
17287 :[FH])
17288 ac_file_inputs=
17289 for ac_f
17290 do
17291 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017292 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 *) # Look for the file first in the build tree, then in the source tree
17294 # (if the path is not absolute). The absolute path cannot be DOS-style,
17295 # because $ac_f cannot contain `:'.
17296 test -f "$ac_f" ||
17297 case $ac_f in
17298 [\\/$]*) false;;
17299 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17300 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017301 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017302 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017303 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17304 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 done
17306
17307 # Let's still pretend it is `configure' which instantiates (i.e., don't
17308 # use $as_me), people would be surprised to read:
17309 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017310 configure_input='Generated from '`
17311 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17312 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313 if test x"$ac_file" != x-; then
17314 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017315 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17316$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017318 # Neutralize special characters interpreted by sed in replacement strings.
17319 case $configure_input in #(
17320 *\&* | *\|* | *\\* )
17321 ac_sed_conf_input=`$as_echo "$configure_input" |
17322 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17323 *) ac_sed_conf_input=$configure_input;;
17324 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325
17326 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017327 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17328 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 esac
17330 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017331 esac
17332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017334$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017335 X"$ac_file" : 'X\(//\)[^/]' \| \
17336 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017337 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017338$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17340 s//\1/
17341 q
17342 }
17343 /^X\(\/\/\)[^/].*/{
17344 s//\1/
17345 q
17346 }
17347 /^X\(\/\/\)$/{
17348 s//\1/
17349 q
17350 }
17351 /^X\(\/\).*/{
17352 s//\1/
17353 q
17354 }
17355 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017356 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017357 ac_builddir=.
17358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359case "$ac_dir" in
17360.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17361*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017362 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017364 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 case $ac_top_builddir_sub in
17366 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17367 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17368 esac ;;
17369esac
17370ac_abs_top_builddir=$ac_pwd
17371ac_abs_builddir=$ac_pwd$ac_dir_suffix
17372# for backward compatibility:
17373ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017374
17375case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378 ac_top_srcdir=$ac_top_builddir_sub
17379 ac_abs_top_srcdir=$ac_pwd ;;
17380 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382 ac_top_srcdir=$srcdir
17383 ac_abs_top_srcdir=$srcdir ;;
17384 *) # Relative name.
17385 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17386 ac_top_srcdir=$ac_top_build_prefix$srcdir
17387 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017388esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017390
Martin v. Löwis11437992002-04-12 09:54:03 +000017391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392 case $ac_mode in
17393 :F)
17394 #
17395 # CONFIG_FILE
17396 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017397
17398 case $INSTALL in
17399 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017401 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017402 ac_MKDIR_P=$MKDIR_P
17403 case $MKDIR_P in
17404 [\\/$]* | ?:[\\/]* ) ;;
17405 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17406 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017407_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408
Matthias Kloseb9621712010-04-24 17:59:49 +000017409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410# If the template does not know about datarootdir, expand it.
17411# FIXME: This hack should be removed a few years after 2.60.
17412ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017413ac_sed_dataroot='
17414/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 p
17416 q
17417}
17418/@datadir@/p
17419/@docdir@/p
17420/@infodir@/p
17421/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017422/@mandir@/p'
17423case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424*datarootdir*) ac_datarootdir_seen=yes;;
17425*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017426 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17427$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 ac_datarootdir_hack='
17431 s&@datadir@&$datadir&g
17432 s&@docdir@&$docdir&g
17433 s&@infodir@&$infodir&g
17434 s&@localedir@&$localedir&g
17435 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017436 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437esac
17438_ACEOF
17439
17440# Neutralize VPATH when `$srcdir' = `.'.
17441# Shell code in configure.ac might set extrasub.
17442# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017443cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17444ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017445$extrasub
17446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017448:t
17449/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017450s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017452s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017453s&@srcdir@&$ac_srcdir&;t t
17454s&@abs_srcdir@&$ac_abs_srcdir&;t t
17455s&@top_srcdir@&$ac_top_srcdir&;t t
17456s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17457s&@builddir@&$ac_builddir&;t t
17458s&@abs_builddir@&$ac_abs_builddir&;t t
17459s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17460s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017461s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017463"
Victor Stinnere0be4232011-10-25 13:06:09 +020017464eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17465 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017468 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17469 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17470 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017472which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017473$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017474which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017475
Victor Stinnere0be4232011-10-25 13:06:09 +020017476 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017478 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17479 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017480 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017481 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482 ;;
17483 :H)
17484 #
17485 # CONFIG_HEADER
17486 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017487 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017488 {
17489 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017490 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17491 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017492 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017493 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017494 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17495$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017496 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017497 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017498 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017499 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017500 fi
17501 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017502 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017503 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017504 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017505 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508
17509 esac
17510
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017511
17512 case $ac_file$ac_mode in
17513 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17514
17515 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516done # for ac_tag
17517
Guido van Rossum627b2d71993-12-24 10:39:16 +000017518
Matthias Kloseb9621712010-04-24 17:59:49 +000017519as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017520_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017521ac_clean_files=$ac_clean_files_save
17522
Matthias Kloseb9621712010-04-24 17:59:49 +000017523test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017524 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017525
Martin v. Löwis11437992002-04-12 09:54:03 +000017526
17527# configure is writing to config.log, and then calls config.status.
17528# config.status does its own redirection, appending to config.log.
17529# Unfortunately, on DOS this fails, as config.log is still kept open
17530# by configure, so config.status won't be able to write to it; its
17531# output is simply discarded. So we exec the FD to /dev/null,
17532# effectively closing config.log, so it can be properly (re)opened and
17533# appended to by config.status. When coming back to configure, we
17534# need to make the FD available again.
17535if test "$no_create" != yes; then
17536 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017537 ac_config_status_args=
17538 test "$silent" = yes &&
17539 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017540 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017541 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017542 exec 5>>config.log
17543 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17544 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017545 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017546fi
17547if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17549$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017550fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017551
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017552
Christian Heimes75ed8902013-11-20 01:11:18 +010017553echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017554if test ! -f Modules/Setup
17555then
17556 cp $srcdir/Modules/Setup.dist Modules/Setup
17557fi
17558
Christian Heimes75ed8902013-11-20 01:11:18 +010017559echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017560if test ! -f Modules/Setup.local
17561then
17562 echo "# Edit this file for local setup changes" >Modules/Setup.local
17563fi
17564
Christian Heimes75ed8902013-11-20 01:11:18 +010017565echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017566$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17567 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017568 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017569mv config.c Modules