blob: 1e55ddc49696ec34ff89992327b090d725c8d2cd [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200683ac_ct_READELF
684READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000685ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200686ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000687AR
688RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000689USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000690GNULD
691LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000696PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BLDLIBRARY
698DLLLIBRARY
699LDLIBRARY
700LIBRARY
701BUILDEXEEXT
702EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200703NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200704MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200705PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200706PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200708ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MAINCC
710CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711GREP
712CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200723_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000724MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000725FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000726FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800727FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000743GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200744PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200745PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700778runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000779localstatedir
780sharedstatedir
781sysconfdir
782datadir
783datarootdir
784libexecdir
785sbindir
786bindir
787program_transform_name
788prefix
789exec_prefix
790PACKAGE_URL
791PACKAGE_BUGREPORT
792PACKAGE_STRING
793PACKAGE_VERSION
794PACKAGE_TARNAME
795PACKAGE_NAME
796PATH_SEPARATOR
797SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000798ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000799ac_user_opts='
800enable_option_checking
801enable_universalsdk
802with_universal_archs
803with_framework_name
804enable_framework
805with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600806with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_cxx_main
808with_suffix
809enable_shared
810enable_profiling
811with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700812with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100813with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100814with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_libs
816with_system_expat
817with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100818with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000819enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700820with_tcltk_includes
821with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_dbmliborder
823with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_threads
825with_thread
826enable_ipv6
827with_doc_strings
828with_tsc
829with_pymalloc
830with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_fpectl
832with_libm
833with_libc
834enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800836with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000837'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 ac_precious_vars='build_alias
839host_alias
840target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100841MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842CC
843CFLAGS
844LDFLAGS
845LIBS
846CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100847CPP
848PKG_CONFIG
849PKG_CONFIG_PATH
850PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854ac_init_help=
855ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000856ac_unrecognized_opts=
857ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# The variables have the same names as the options, with
859# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872x_includes=NONE
873x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700889runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890includedir='${prefix}/include'
891oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893infodir='${datarootdir}/info'
894htmldir='${docdir}'
895dvidir='${docdir}'
896pdfdir='${docdir}'
897psdir='${docdir}'
898libdir='${exec_prefix}/lib'
899localedir='${datarootdir}/locale'
900mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 # If the previous option needs an argument, assign it.
907 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 ac_prev=
910 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200914 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915 *=) ac_optarg= ;;
916 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Accept the important Cygnus configure options, so we can diagnose typos.
920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_dashdash$ac_option in
922 --)
923 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -bindir | --bindir | --bindi | --bind | --bin | --bi)
926 ac_prev=bindir ;;
927 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
930 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 -cache-file | --cache-file | --cache-fil | --cache-fi \
936 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937 ac_prev=cache_file ;;
938 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 cache_file=$ac_optarg ;;
941
942 --config-cache | -C)
943 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951 | --dataroo | --dataro | --datar)
952 ac_prev=datarootdir ;;
953 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955 datarootdir=$ac_optarg ;;
956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200961 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt_orig=$ac_useropt
963 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972
973 -docdir | --docdir | --docdi | --doc | --do)
974 ac_prev=docdir ;;
975 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976 docdir=$ac_optarg ;;
977
978 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979 ac_prev=dvidir ;;
980 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001 | --exec | --exe | --ex)
1002 ac_prev=exec_prefix ;;
1003 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 # Obsolete; use --with-gas.
1010 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 -help | --help | --hel | --he | -h)
1013 ac_init_help=long ;;
1014 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015 ac_init_help=recursive ;;
1016 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025 ac_prev=htmldir ;;
1026 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027 | --ht=*)
1028 htmldir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -includedir | --includedir | --includedi | --included | --include \
1031 | --includ | --inclu | --incl | --inc)
1032 ac_prev=includedir ;;
1033 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -infodir | --infodir | --infodi | --infod | --info | --inf)
1038 ac_prev=infodir ;;
1039 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libdir | --libdir | --libdi | --libd)
1043 ac_prev=libdir ;;
1044 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048 | --libexe | --libex | --libe)
1049 ac_prev=libexecdir ;;
1050 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -localedir | --localedir | --localedi | --localed | --locale)
1055 ac_prev=localedir ;;
1056 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057 localedir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 ac_prev=localstatedir ;;
1062 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067 ac_prev=mandir ;;
1068 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 # Obsolete; use --without-fp.
1073 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 no_create=yes ;;
1078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085 | --oldin | --oldi | --old | --ol | --o)
1086 ac_prev=oldincludedir ;;
1087 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093 ac_prev=prefix ;;
1094 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098 | --program-pre | --program-pr | --program-p)
1099 ac_prev=program_prefix ;;
1100 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105 | --program-suf | --program-su | --program-s)
1106 ac_prev=program_suffix ;;
1107 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-transform-name | --program-transform-name \
1112 | --program-transform-nam | --program-transform-na \
1113 | --program-transform-n | --program-transform- \
1114 | --program-transform | --program-transfor \
1115 | --program-transfo | --program-transf \
1116 | --program-trans | --program-tran \
1117 | --progr-tra | --program-tr | --program-t)
1118 ac_prev=program_transform_name ;;
1119 -program-transform-name=* | --program-transform-name=* \
1120 | --program-transform-nam=* | --program-transform-na=* \
1121 | --program-transform-n=* | --program-transform-=* \
1122 | --program-transform=* | --program-transfor=* \
1123 | --program-transfo=* | --program-transf=* \
1124 | --program-trans=* | --program-tran=* \
1125 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001128 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129 ac_prev=pdfdir ;;
1130 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131 pdfdir=$ac_optarg ;;
1132
1133 -psdir | --psdir | --psdi | --psd | --ps)
1134 ac_prev=psdir ;;
1135 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136 psdir=$ac_optarg ;;
1137
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 silent=yes ;;
1141
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001142 -runstatedir | --runstatedir | --runstatedi | --runstated \
1143 | --runstate | --runstat | --runsta | --runst | --runs \
1144 | --run | --ru | --r)
1145 ac_prev=runstatedir ;;
1146 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1147 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1148 | --run=* | --ru=* | --r=*)
1149 runstatedir=$ac_optarg ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001288 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001401\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001441 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001467 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001530 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001624python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
Matthias Kloseb9621712010-04-24 17:59:49 +00001977# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1978# --------------------------------------------
1979# Tries to find the compile-time value of EXPR in a program that includes
1980# INCLUDES, setting VAR accordingly. Returns whether the value could be
1981# computed
1982ac_fn_c_compute_int ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 if test "$cross_compiling" = yes; then
1986 # Depending upon the size, compute the lo and hi bounds.
1987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 ac_lo=0 ac_mid=0
2003 while :; do
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_hi=$ac_mid; break
2020else
2021 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2022 if test $ac_lo -le $ac_mid; then
2023 ac_lo= ac_hi=
2024 break
2025 fi
2026 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 done
2030else
2031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032/* end confdefs.h. */
2033$4
2034int
2035main ()
2036{
2037static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002038test_array [0] = 0;
2039return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=-1 ac_mid=-1
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_lo=$ac_mid; break
2064else
2065 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2066 if test $ac_mid -le $ac_hi; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 ac_lo= ac_hi=
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080# Binary search between lo and hi bounds.
2081while test "x$ac_lo" != "x$ac_hi"; do
2082 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid
2099else
2100 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103done
2104case $ac_lo in #((
2105?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2106'') ac_retval=1 ;;
2107esac
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112static long int longval () { return $2; }
2113static unsigned long int ulongval () { return $2; }
2114#include <stdio.h>
2115#include <stdlib.h>
2116int
2117main ()
2118{
2119
2120 FILE *f = fopen ("conftest.val", "w");
2121 if (! f)
2122 return 1;
2123 if (($2) < 0)
2124 {
2125 long int i = longval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%ld", i);
2129 }
2130 else
2131 {
2132 unsigned long int i = ulongval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%lu", i);
2136 }
2137 /* Do not output a trailing newline, as this causes \r\n confusion
2138 on some platforms. */
2139 return ferror (f) || fclose (f) != 0;
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_run "$LINENO"; then :
2146 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2147else
2148 ac_retval=1
2149fi
2150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2151 conftest.$ac_objext conftest.beam conftest.$ac_ext
2152rm -f conftest.val
2153
2154 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_compute_int
2159
2160# ac_fn_c_check_func LINENO FUNC VAR
2161# ----------------------------------
2162# Tests whether FUNC exists, setting the cache variable VAR accordingly
2163ac_fn_c_check_func ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2167$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002168if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002169 $as_echo_n "(cached) " >&6
2170else
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2174 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2175#define $2 innocuous_$2
2176
2177/* System header to define __stub macros and hopefully few prototypes,
2178 which can conflict with char $2 (); below.
2179 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2180 <limits.h> exists even on freestanding compilers. */
2181
2182#ifdef __STDC__
2183# include <limits.h>
2184#else
2185# include <assert.h>
2186#endif
2187
2188#undef $2
2189
2190/* Override any GCC internal prototype to avoid an error.
2191 Use char because int might match the return type of a GCC
2192 builtin and then its argument prototype would still apply. */
2193#ifdef __cplusplus
2194extern "C"
2195#endif
2196char $2 ();
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined __stub_$2 || defined __stub___$2
2201choke me
2202#endif
2203
2204int
2205main ()
2206{
2207return $2 ();
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_link "$LINENO"; then :
2213 eval "$3=yes"
2214else
2215 eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext \
2218 conftest$ac_exeext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225} # ac_fn_c_check_func
2226
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002227# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2228# ---------------------------------------------
2229# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2230# accordingly.
2231ac_fn_c_check_decl ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 as_decl_name=`echo $2|sed 's/ *(.*//'`
2235 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2237$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2238if eval \${$3+:} false; then :
2239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244int
2245main ()
2246{
2247#ifndef $as_decl_name
2248#ifdef __cplusplus
2249 (void) $as_decl_use;
2250#else
2251 (void) $as_decl_name;
2252#endif
2253#endif
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265fi
2266eval ac_res=\$$3
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2268$as_echo "$ac_res" >&6; }
2269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270
2271} # ac_fn_c_check_decl
2272
Matthias Kloseb9621712010-04-24 17:59:49 +00002273# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2274# ----------------------------------------------------
2275# Tries to find if the field MEMBER exists in type AGGR, after including
2276# INCLUDES, setting cache variable VAR accordingly.
2277ac_fn_c_check_member ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2281$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002282if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$5
2288int
2289main ()
2290{
2291static $2 ac_aggr;
2292if (ac_aggr.$3)
2293return 0;
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$4=yes"
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$5
2304int
2305main ()
2306{
2307static $2 ac_aggr;
2308if (sizeof ac_aggr.$3)
2309return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$4=yes"
2316else
2317 eval "$4=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$4
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002326 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002327
2328} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002330This file contains any messages produced by compilers while
2331running configure, to aid debugging if configure makes a mistake.
2332
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002333It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002334generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
2336 $ $0 $@
2337
2338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002340{
2341cat <<_ASUNAME
2342## --------- ##
2343## Platform. ##
2344## --------- ##
2345
2346hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2347uname -m = `(uname -m) 2>/dev/null || echo unknown`
2348uname -r = `(uname -r) 2>/dev/null || echo unknown`
2349uname -s = `(uname -s) 2>/dev/null || echo unknown`
2350uname -v = `(uname -v) 2>/dev/null || echo unknown`
2351
2352/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2353/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2354
2355/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2356/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2357/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002359/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2360/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2361/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2362
2363_ASUNAME
2364
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002370 $as_echo "PATH: $as_dir"
2371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374} >&5
2375
2376cat >&5 <<_ACEOF
2377
2378
2379## ----------- ##
2380## Core tests. ##
2381## ----------- ##
2382
2383_ACEOF
2384
2385
2386# Keep a trace of the command line.
2387# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002390# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002391ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_configure_args0=
2393ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002394ac_must_keep_next=false
2395for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002396do
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 for ac_arg
2398 do
2399 case $ac_arg in
2400 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2402 | -silent | --silent | --silen | --sile | --sil)
2403 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 esac
2407 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002414 case $ac_arg in
2415 *=* | --config-cache | -C | -disable-* | --disable-* \
2416 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2417 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2418 | -with-* | --with-* | -without-* | --without-* | --x)
2419 case "$ac_configure_args0 " in
2420 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2421 esac
2422 ;;
2423 -* ) ac_must_keep_next=true ;;
2424 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 ;;
2428 esac
2429 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002430done
Matthias Kloseb9621712010-04-24 17:59:49 +00002431{ ac_configure_args0=; unset ac_configure_args0;}
2432{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434# When interrupted or exit'd, cleanup temporary files, and complete
2435# config.log. We remove comments because anyway the quotes in there
2436# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437# WARNING: Use '\'' to represent an apostrophe within the trap.
2438# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002439trap 'exit_status=$?
2440 # Save into config.log some information that might help in debugging.
2441 {
2442 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002444 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002446## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002481## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 echo
2484 for ac_var in $ac_subst_vars
2485 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 eval ac_val=\$$ac_var
2487 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 done | sort
2492 echo
2493
2494 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_files
2500 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508 fi
2509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
2517 fi
2518 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$as_me: caught signal $ac_signal"
2520 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 rm -f core *.core core.conftest.* &&
2523 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002526for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529ac_signal=0
2530
2531# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
Matthias Kloseb9621712010-04-24 17:59:49 +00002534$as_echo "/* confdefs.h */" > confdefs.h
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536# Predefined preprocessor variables.
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_NAME "$PACKAGE_NAME"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2544_ACEOF
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_VERSION "$PACKAGE_VERSION"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_STRING "$PACKAGE_STRING"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2556_ACEOF
2557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_URL "$PACKAGE_URL"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002564# Prefer an explicitly selected file to automatically selected ones.
2565ac_site_file1=NONE
2566ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568 # We do not want a PATH search for config.site.
2569 case $CONFIG_SITE in #((
2570 -*) ac_site_file1=./$CONFIG_SITE;;
2571 */*) ac_site_file1=$CONFIG_SITE;;
2572 *) ac_site_file1=./$CONFIG_SITE;;
2573 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 . "$ac_site_file" \
2589 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2591as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002592See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Trent Nelson4d4ec652012-10-16 08:51:24 -04002682
Trent Nelson5595ab52012-10-17 04:47:31 -04002683if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002684 # If we're building out-of-tree, we need to make sure the following
2685 # resources get picked up before their $srcdir counterparts.
2686 # Objects/ -> typeslots.inc
2687 # Include/ -> Python-ast.h, graminit.h
2688 # Python/ -> importlib.h
2689 # (A side effect of this is that these resources will automatically be
2690 # regenerated when building out-of-tree, regardless of whether or not
2691 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2692 # off.)
2693 BASECPPFLAGS="-IObjects -IInclude -IPython"
2694else
2695 BASECPPFLAGS=""
2696fi
2697
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002698
2699
2700
2701
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002702if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703then
2704# Extract the first word of "hg", so it can be a program name with args.
2705set dummy hg; ac_word=$2
2706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2707$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002708if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709 $as_echo_n "(cached) " >&6
2710else
2711 if test -n "$HAS_HG"; then
2712 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2713else
2714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2715for as_dir in $PATH
2716do
2717 IFS=$as_save_IFS
2718 test -z "$as_dir" && as_dir=.
2719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 ac_cv_prog_HAS_HG="found"
2722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2723 break 2
2724 fi
2725done
2726 done
2727IFS=$as_save_IFS
2728
2729 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2730fi
2731fi
2732HAS_HG=$ac_cv_prog_HAS_HG
2733if test -n "$HAS_HG"; then
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2735$as_echo "$HAS_HG" >&6; }
2736else
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2738$as_echo "no" >&6; }
2739fi
2740
2741
2742else
2743HAS_HG=no-repository
2744fi
2745if test $HAS_HG = found
2746then
2747 HGVERSION="hg id -i \$(srcdir)"
2748 HGTAG="hg id -t \$(srcdir)"
2749 HGBRANCH="hg id -b \$(srcdir)"
2750else
2751 HGVERSION=""
2752 HGTAG=""
2753 HGBRANCH=""
2754fi
2755
2756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002757ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
2759
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002760ac_aux_dir=
2761for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2762 if test -f "$ac_dir/install-sh"; then
2763 ac_aux_dir=$ac_dir
2764 ac_install_sh="$ac_aux_dir/install-sh -c"
2765 break
2766 elif test -f "$ac_dir/install.sh"; then
2767 ac_aux_dir=$ac_dir
2768 ac_install_sh="$ac_aux_dir/install.sh -c"
2769 break
2770 elif test -f "$ac_dir/shtool"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/shtool install -c"
2773 break
2774 fi
2775done
2776if test -z "$ac_aux_dir"; then
2777 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2778fi
2779
2780# These three variables are undocumented and unsupported,
2781# and are intended to be withdrawn in a future Autoconf release.
2782# They can cause serious problems if a builder's source tree is in a directory
2783# whose full name contains unusual characters.
2784ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2785ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2786ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2787
2788
2789# Make sure we can run config.sub.
2790$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2791 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2792
2793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2794$as_echo_n "checking build system type... " >&6; }
2795if ${ac_cv_build+:} false; then :
2796 $as_echo_n "(cached) " >&6
2797else
2798 ac_build_alias=$build_alias
2799test "x$ac_build_alias" = x &&
2800 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2801test "x$ac_build_alias" = x &&
2802 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2803ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2804 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2805
2806fi
2807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2808$as_echo "$ac_cv_build" >&6; }
2809case $ac_cv_build in
2810*-*-*) ;;
2811*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2812esac
2813build=$ac_cv_build
2814ac_save_IFS=$IFS; IFS='-'
2815set x $ac_cv_build
2816shift
2817build_cpu=$1
2818build_vendor=$2
2819shift; shift
2820# Remember, the first character of IFS is used to create $*,
2821# except with old shells:
2822build_os=$*
2823IFS=$ac_save_IFS
2824case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2825
2826
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2828$as_echo_n "checking host system type... " >&6; }
2829if ${ac_cv_host+:} false; then :
2830 $as_echo_n "(cached) " >&6
2831else
2832 if test "x$host_alias" = x; then
2833 ac_cv_host=$ac_cv_build
2834else
2835 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2836 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2837fi
2838
2839fi
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2841$as_echo "$ac_cv_host" >&6; }
2842case $ac_cv_host in
2843*-*-*) ;;
2844*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2845esac
2846host=$ac_cv_host
2847ac_save_IFS=$IFS; IFS='-'
2848set x $ac_cv_host
2849shift
2850host_cpu=$1
2851host_vendor=$2
2852shift; shift
2853# Remember, the first character of IFS is used to create $*,
2854# except with old shells:
2855host_os=$*
2856IFS=$ac_save_IFS
2857case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2858
2859
2860
doko@python.orga10e4a92013-01-25 18:45:12 +01002861
2862
Ned Deilyfcbc2462014-08-22 13:32:49 -07002863# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2864rm -f pybuilddir.txt
2865
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002866for ac_prog in python$PACKAGE_VERSION python3 python
2867do
2868 # Extract the first word of "$ac_prog", so it can be a program name with args.
2869set dummy $ac_prog; ac_word=$2
2870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2871$as_echo_n "checking for $ac_word... " >&6; }
2872if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2873 $as_echo_n "(cached) " >&6
2874else
2875 if test -n "$PYTHON_FOR_GEN"; then
2876 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2877else
2878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2879for as_dir in $PATH
2880do
2881 IFS=$as_save_IFS
2882 test -z "$as_dir" && as_dir=.
2883 for ac_exec_ext in '' $ac_executable_extensions; do
2884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2885 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2887 break 2
2888 fi
2889done
2890 done
2891IFS=$as_save_IFS
2892
2893fi
2894fi
2895PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2896if test -n "$PYTHON_FOR_GEN"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2898$as_echo "$PYTHON_FOR_GEN" >&6; }
2899else
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2901$as_echo "no" >&6; }
2902fi
2903
2904
2905 test -n "$PYTHON_FOR_GEN" && break
2906done
2907test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2908
2909if test "$PYTHON_FOR_GEN" = not-found; then
2910 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2911 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2912 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2913fi
2914
2915
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002916if test "$cross_compiling" = yes; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2918$as_echo_n "checking for python interpreter for cross build... " >&6; }
2919 if test -z "$PYTHON_FOR_BUILD"; then
2920 for interp in python$PACKAGE_VERSION python3 python; do
2921 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002922 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002923 break
2924 fi
2925 interp=
2926 done
2927 if test x$interp = x; then
2928 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2929 fi
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2931$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002932 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002933 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002934 # Used to comment out stuff for rebuilding generated files
2935 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002940 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Martin Pantereac67be2016-07-28 01:28:27 +00002945
Benjamin Petersond23f8222009-04-05 19:13:16 +00002946if test "$prefix" != "/"; then
2947 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
2952
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002953# We don't use PACKAGE_ variables, and they cause conflicts
2954# with other autoconf-based packages that include Python.h
2955grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2956rm confdefs.h
2957mv confdefs.h.new confdefs.h
2958
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002959
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002960VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002961
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002962# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002963
2964SOVERSION=1.0
2965
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966# The later defininition of _XOPEN_SOURCE disables certain features
2967# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970
2971
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977
2978
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984
2985
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002990
2991
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2993# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2994# them.
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997
2998
2999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003000define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003001
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003002# Arguments passed to configure.
3003
3004CONFIG_ARGS="$ac_configure_args"
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3007$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003008# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003009if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003010 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011 case $enableval in
3012 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003013 # Locate the best usable SDK, see Mac/README.txt for more
3014 # information
3015 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003016 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003017 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3019 if test ! -d "${enableval}"
3020 then
3021 enableval=/
3022 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ;;
3025 esac
3026 case $enableval in
3027 no)
3028 UNIVERSALSDK=
3029 enable_universalsdk=
3030 ;;
3031 *)
3032 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 if test ! -d "${UNIVERSALSDK}"
3034 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003035 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 ;;
3038 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041else
3042
3043 UNIVERSALSDK=
3044 enable_universalsdk=
3045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048if test -n "${UNIVERSALSDK}"
3049then
Matthias Kloseb9621712010-04-24 17:59:49 +00003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3051$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052else
Matthias Kloseb9621712010-04-24 17:59:49 +00003053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3054$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003058
Ned Deily87adb6e2013-10-18 21:09:56 -07003059ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003060
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061# For backward compatibility reasons we prefer to select '32-bit' if available,
3062# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064if test "`uname -s`" = "Darwin"
3065then
3066 if test -n "${UNIVERSALSDK}"
3067 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003068 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069 then
3070 UNIVERSAL_ARCHS="intel"
3071 fi
3072 fi
3073fi
3074
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3077$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078
3079# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003080if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082 UNIVERSAL_ARCHS="$withval"
3083
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084fi
3085
Ned Deily87adb6e2013-10-18 21:09:56 -07003086if test -n "${UNIVERSALSDK}"
3087then
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3089$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3090else
3091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3092$as_echo "no" >&6; }
3093fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003095
3096# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003097if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003098 withval=$with_framework_name;
3099 PYTHONFRAMEWORK=${withval}
3100 PYTHONFRAMEWORKDIR=${withval}.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3102
3103else
3104
3105 PYTHONFRAMEWORK=Python
3106 PYTHONFRAMEWORKDIR=Python.framework
3107 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3108
3109fi
3110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003112if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003113 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003114 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003115 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003116 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 esac
3118 case $enableval in
3119 no)
3120 PYTHONFRAMEWORK=
3121 PYTHONFRAMEWORKDIR=no-framework
3122 PYTHONFRAMEWORKPREFIX=
3123 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124 FRAMEWORKINSTALLFIRST=
3125 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 FRAMEWORKALTINSTALLFIRST=
3127 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003128 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003129 if test "x${prefix}" = "xNONE"; then
3130 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3131 else
3132 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3133 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003135 ;;
3136 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003139 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003140 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003141 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3142 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003143 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003145
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003146 if test "x${prefix}" = "xNONE" ; then
3147 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003149 else
3150 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3151 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152
3153 case "${enableval}" in
3154 /System*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 if test "${prefix}" = "NONE" ; then
3157 # See below
3158 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3159 fi
3160 ;;
3161
3162 /Library*)
3163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3164 ;;
3165
3166 */Library/Frameworks)
3167 MDIR="`dirname "${enableval}"`"
3168 MDIR="`dirname "${MDIR}"`"
3169 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3170
3171 if test "${prefix}" = "NONE"; then
3172 # User hasn't specified the
3173 # --prefix option, but wants to install
3174 # the framework in a non-default location,
3175 # ensure that the compatibility links get
3176 # installed relative to that prefix as well
3177 # instead of in /usr/local.
3178 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3179 fi
3180 ;;
3181
3182 *)
3183 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3184 ;;
3185 esac
3186
Jack Jansen127e56e2001-09-11 14:41:54 +00003187 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003195 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3196
3197 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3198
Jack Jansene578a632001-08-15 01:27:14 +00003199 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Guido van Rossum563e7081996-09-10 18:20:48 +00003201else
Martin v. Löwis11437992002-04-12 09:54:03 +00003202
Jack Jansene578a632001-08-15 01:27:14 +00003203 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003204 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003205 PYTHONFRAMEWORKPREFIX=
3206 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003207 FRAMEWORKINSTALLFIRST=
3208 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 FRAMEWORKALTINSTALLFIRST=
3210 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003211 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003212 if test "x${prefix}" = "xNONE" ; then
3213 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3214 else
3215 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3216 fi
Jack Jansene578a632001-08-15 01:27:14 +00003217 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003218
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003219
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003220fi
3221
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222
3223
Michael W. Hudson54241132001-12-07 15:38:26 +00003224
3225
3226
3227
Jack Jansene578a632001-08-15 01:27:14 +00003228
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003229
3230
3231
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003232
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003233
Ned Deilyb8f944f2013-11-21 22:42:25 -08003234
Jack Jansene578a632001-08-15 01:27:14 +00003235##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003236## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003237## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003238##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239# Set name for machine-dependent library files
3240
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3242$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243if test -z "$MACHDEP"
3244then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 # avoid using uname for cross builds
3246 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003247 # ac_sys_system and ac_sys_release are used for setting
3248 # a lot of different things including 'define_xopen_source'
3249 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 case "$host" in
3251 *-*-linux*)
3252 ac_sys_system=Linux
3253 ;;
3254 *-*-cygwin*)
3255 ac_sys_system=Cygwin
3256 ;;
3257 *)
3258 # for now, limit cross builds to known configurations
3259 MACHDEP="unknown"
3260 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3261 esac
3262 ac_sys_release=
3263 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003264 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003265 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003266 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003267 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003271 fi
3272 ac_md_system=`echo $ac_sys_system |
3273 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3274 ac_md_release=`echo $ac_sys_release |
3275 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3276 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003277
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003279 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003280 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003281 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003282 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On FreeBSD 4, the math functions C89 does not cover are never defined
3364 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3365 FreeBSD/4.*)
3366 define_xopen_source=no;;
3367 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3368 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3369 # identifies itself as Darwin/7.*
3370 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # disables platform specific features beyond repair.
3372 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # has no effect, don't bother defining them
3374 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003375 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003376 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003377 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003378 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3379 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3380 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003381 AIX/4)
3382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 AIX/5)
3384 if test `uname -r` -eq 1; then
3385 define_xopen_source=no
3386 fi
3387 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003388 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3389 # defining NI_NUMERICHOST.
3390 QNX/6.3.2)
3391 define_xopen_source=no
3392 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394esac
3395
3396if test $define_xopen_source = yes
3397then
Victor Stinner14d098d2011-09-07 22:29:43 +02003398 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Victor Stinner14d098d2011-09-07 22:29:43 +02003400$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
3403 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3404 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3405 # several APIs are not declared. Since this is also needed in some
3406 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Matthias Kloseb9621712010-04-24 17:59:49 +00003408$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
3410
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003411
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003412$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414fi
3415
Christian Heimes647cd872013-12-07 23:39:33 +01003416# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3417case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003418 hp*|HP*)
3419 define_stdc_a1=yes;;
3420 *)
3421 define_stdc_a1=no;;
3422esac
3423
3424if test $define_stdc_a1 = yes
3425then
Christian Heimes647cd872013-12-07 23:39:33 +01003426
3427$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3428
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429fi
Christian Heimes647cd872013-12-07 23:39:33 +01003430
Guido van Rossum91922671997-10-09 20:24:13 +00003431#
3432# SGI compilers allow the specification of the both the ABI and the
3433# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003434# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003435#
3436# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3437# thus supply support for various ABI/ISA combinations. The MACHDEP
3438# variable is also adjusted.
3439#
3440
3441if test ! -z "$SGI_ABI"
3442then
3443 CC="cc $SGI_ABI"
3444 LDFLAGS="$SGI_ABI $LDFLAGS"
3445 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3448$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3451# it may influence the way we can build extensions, so distutils
3452# needs to check it
3453
Thomas Wouters477c8d52006-05-27 19:21:47 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003457
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003459
3460# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3461# for debug/optimization stuff. BASECFLAGS is for flags that are required
3462# just to get things to compile and link. Users are free to override OPT
3463# when running configure or make. The build should not break if they do.
3464# BASECFLAGS should generally not be messed with, however.
3465
3466# XXX shouldn't some/most/all of this code be merged with the stuff later
3467# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3469$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003472if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003474 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003475 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476 without_gcc=yes;;
3477 yes) CC=gcc
3478 without_gcc=no;;
3479 *) CC=$withval
3480 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003481 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003484 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003485 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003486 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003487 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003488 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489fi
3490
Matthias Kloseb9621712010-04-24 17:59:49 +00003491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3492$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003493
Zachary Ware5af85642015-12-21 12:09:17 -06003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3495$as_echo_n "checking for --with-icc... " >&6; }
3496
3497# Check whether --with-icc was given.
3498if test "${with_icc+set}" = set; then :
3499 withval=$with_icc;
3500 case $withval in
3501 no) CC=${CC:-cc}
3502 with_icc=no;;
3503 yes) CC=icc
3504 CXX=icpc
3505 with_icc=yes;;
3506 *) CC=$withval
3507 with_icc=$withval;;
3508 esac
3509else
3510
3511 with_icc=no
3512fi
3513
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3515$as_echo "$with_icc" >&6; }
3516
Guido van Rossum8b131c51995-03-09 14:10:13 +00003517# If the user switches compilers, we can't believe the cache
3518if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3519then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003520 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003521(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522fi
3523
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003524# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3525# when the compiler supports them, but we don't always want -O2, and
3526# we set -g later.
3527if test -z "$CFLAGS"; then
3528 CFLAGS=
3529fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530
3531if test "$ac_sys_system" = "Darwin"
3532then
3533 # Compiler selection on MacOSX is more complicated than
3534 # AC_PROG_CC can handle, see Mac/README.txt for more
3535 # information
3536 if test -z "${CC}"
3537 then
3538 found_gcc=
3539 found_clang=
3540 as_save_IFS=$IFS; IFS=:
3541 for as_dir in $PATH
3542 do
3543 IFS=$as_save_IFS
3544 if test -x $as_dir/gcc; then
3545 if test -z "${found_gcc}"; then
3546 found_gcc=$as_dir/gcc
3547 fi
3548 fi
3549 if test -x $as_dir/clang; then
3550 if test -z "${found_clang}"; then
3551 found_clang=$as_dir/clang
3552 fi
3553 fi
3554 done
3555 IFS=$as_save_IFS
3556
3557 if test -n "$found_gcc" -a -n "$found_clang"
3558 then
3559 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3562$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3563 CC="$found_clang"
3564 CXX="$found_clang++"
3565 fi
3566
3567
3568 elif test -z "$found_gcc" -a -n "$found_clang"
3569 then
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3571$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3572 CC="$found_clang"
3573 CXX="$found_clang++"
3574
3575 elif test -z "$found_gcc" -a -z "$found_clang"
3576 then
3577 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3578 if test -n "${found_clang}"
3579 then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3581$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3582 CC="${found_clang}"
3583 CXX="`/usr/bin/xcrun -find clang++`"
3584
3585 # else: use default behaviour
3586 fi
3587 fi
3588 fi
3589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003590ac_ext=c
3591ac_cpp='$CPP $CPPFLAGS'
3592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_c_compiler_gnu
3595if test -n "$ac_tool_prefix"; then
3596 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3597set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3599$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003600if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003602else
3603 if test -n "$CC"; then
3604 ac_cv_prog_CC="$CC" # Let the user override the test.
3605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3607for as_dir in $PATH
3608do
3609 IFS=$as_save_IFS
3610 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 break 2
3616 fi
3617done
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003620
Jack Jansendd19cf82001-12-06 22:36:17 +00003621fi
3622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003623CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003624if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3626$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003627else
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3629$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003630fi
3631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633fi
3634if test -z "$ac_cv_prog_CC"; then
3635 ac_ct_CC=$CC
3636 # Extract the first word of "gcc", so it can be a program name with args.
3637set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3639$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003640if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
3643 if test -n "$ac_ct_CC"; then
3644 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3645else
3646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3647for as_dir in $PATH
3648do
3649 IFS=$as_save_IFS
3650 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 break 2
3656 fi
3657done
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003660
3661fi
3662fi
3663ac_ct_CC=$ac_cv_prog_ac_ct_CC
3664if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3666$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3669$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test "x$ac_ct_CC" = x; then
3673 CC=""
3674 else
3675 case $cross_compiling:$ac_tool_warned in
3676yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679ac_tool_warned=yes ;;
3680esac
3681 CC=$ac_ct_CC
3682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683else
3684 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003685fi
3686
Jack Jansendd19cf82001-12-06 22:36:17 +00003687if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 if test -n "$ac_tool_prefix"; then
3689 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003690set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3692$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003693if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003695else
3696 if test -n "$CC"; then
3697 ac_cv_prog_CC="$CC" # Let the user override the test.
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3700for as_dir in $PATH
3701do
3702 IFS=$as_save_IFS
3703 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 break 2
3709 fi
3710done
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003713
3714fi
3715fi
3716CC=$ac_cv_prog_CC
3717if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3719$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003720else
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3722$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723fi
3724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003727fi
3728if test -z "$CC"; then
3729 # Extract the first word of "cc", so it can be a program name with args.
3730set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003733if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003735else
3736 if test -n "$CC"; then
3737 ac_cv_prog_CC="$CC" # Let the user override the test.
3738else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3741for as_dir in $PATH
3742do
3743 IFS=$as_save_IFS
3744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3748 ac_prog_rejected=yes
3749 continue
3750 fi
3751 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 break 2
3754 fi
3755done
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759if test $ac_prog_rejected = yes; then
3760 # We found a bogon in the path, so make sure we never use it.
3761 set dummy $ac_cv_prog_CC
3762 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764 # We chose a different compiler from the bogus one.
3765 # However, it has the same basename, so the bogon will be chosen
3766 # first if we set CC to just the basename; use the full file name.
3767 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003768 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 fi
3770fi
3771fi
3772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003773CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3776$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777else
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3779$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780fi
3781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
3784if test -z "$CC"; then
3785 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 do
3788 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003794else
3795 if test -n "$CC"; then
3796 ac_cv_prog_CC="$CC" # Let the user override the test.
3797else
Martin v. Löwis11437992002-04-12 09:54:03 +00003798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
3813fi
3814fi
3815CC=$ac_cv_prog_CC
3816if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3818$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003822fi
3823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$CC" && break
3826 done
3827fi
3828if test -z "$CC"; then
3829 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003831do
3832 # Extract the first word of "$ac_prog", so it can be a program name with args.
3833set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3835$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003836if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003838else
3839 if test -n "$ac_ct_CC"; then
3840 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3841else
3842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3843for as_dir in $PATH
3844do
3845 IFS=$as_save_IFS
3846 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 break 2
3852 fi
3853done
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858fi
3859ac_ct_CC=$ac_cv_prog_ac_ct_CC
3860if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3862$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863else
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 test -n "$ac_ct_CC" && break
3870done
Michael W. Hudson54241132001-12-07 15:38:26 +00003871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872 if test "x$ac_ct_CC" = x; then
3873 CC=""
3874 else
3875 case $cross_compiling:$ac_tool_warned in
3876yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_tool_warned=yes ;;
3880esac
3881 CC=$ac_ct_CC
3882 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003883fi
3884
3885fi
3886
3887
Matthias Kloseb9621712010-04-24 17:59:49 +00003888test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003890as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003891See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892
3893# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3895set X $ac_compile
3896ac_compiler=$2
3897for ac_option in --version -v -V -qversion; do
3898 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899case "(($ac_try" in
3900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3901 *) ac_try_echo=$ac_try;;
3902esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3904$as_echo "$ac_try_echo"; } >&5
3905 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 if test -s conftest.err; then
3908 sed '10a\
3909... rest of stderr output deleted ...
3910 10q' conftest.err >conftest.er1
3911 cat conftest.er1 >&5
3912 fi
3913 rm -f conftest.er1 conftest.err
3914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3915 test $ac_status = 0; }
3916done
Martin v. Löwis11437992002-04-12 09:54:03 +00003917
Matthias Kloseb9621712010-04-24 17:59:49 +00003918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003919/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003920
Martin v. Löwis11437992002-04-12 09:54:03 +00003921int
3922main ()
3923{
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
3929ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003930ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003931# Try to create an executable without -o first, disregard a.out.
3932# It will help us diagnose broken compilers, and finding out an intuition
3933# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3935$as_echo_n "checking whether the C compiler works... " >&6; }
3936ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3937
3938# The possible output files:
3939ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941ac_rmfiles=
3942for ac_file in $ac_files
3943do
3944 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3947 esac
3948done
3949rm -f $ac_rmfiles
3950
Matthias Kloseb9621712010-04-24 17:59:49 +00003951if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952case "(($ac_try" in
3953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3954 *) ac_try_echo=$ac_try;;
3955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3957$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3963# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3964# in a Makefile. We should not override ac_cv_exeext if it was cached,
3965# so that the user can short-circuit this test for compilers unknown to
3966# Autoconf.
3967for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003968do
3969 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 ;;
3973 [ab].out )
3974 # We found the default executable, but exeext='' is most
3975 # certainly right.
3976 break;;
3977 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 then :; else
3980 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3981 fi
3982 # We set ac_cv_exeext here because the later test for it is not
3983 # safe: cross compilers may not add the suffix if given an `-o'
3984 # argument, so we may need to know it at that point already.
3985 # Even if this section looks crufty: it has the advantage of
3986 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987 break;;
3988 * )
3989 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 esac
3991done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992test "$ac_cv_exeext" = no && ac_cv_exeext=
3993
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003994else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 ac_file=''
3996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003997if test -z "$ac_file"; then :
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3999$as_echo "no" >&6; }
4000$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004001sed 's/^/| /' conftest.$ac_ext >&5
4002
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004005as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004006See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004007else
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4009$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4012$as_echo_n "checking for C compiler default output file name... " >&6; }
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4014$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4020$as_echo_n "checking for suffix of executables... " >&6; }
4021if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4033# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4034# work properly (i.e., refer to `conftest.exe'), while it won't with
4035# `rm'.
4036for ac_file in conftest.exe conftest conftest.*; do
4037 test -f "$ac_file" || continue
4038 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004040 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4041 break;;
4042 * ) break;;
4043 esac
4044done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004048as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004049See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004051rm -f conftest conftest$ac_cv_exeext
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4053$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054
4055rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004056EXEEXT=$ac_cv_exeext
4057ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4059/* end confdefs.h. */
4060#include <stdio.h>
4061int
4062main ()
4063{
4064FILE *f = fopen ("conftest.out", "w");
4065 return ferror (f) || fclose (f) != 0;
4066
4067 ;
4068 return 0;
4069}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004071ac_clean_files="$ac_clean_files conftest.out"
4072# Check that the compiler produces executables we can run. If not, either
4073# the compiler is broken, or we cross compile.
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4075$as_echo_n "checking whether we are cross compiling... " >&6; }
4076if test "$cross_compiling" != yes; then
4077 { { ac_try="$ac_link"
4078case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
4082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
4084 (eval "$ac_link") 2>&5
4085 ac_status=$?
4086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }
4088 if { ac_try='./conftest$ac_cv_exeext'
4089 { { case "(($ac_try" in
4090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4091 *) ac_try_echo=$ac_try;;
4092esac
4093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4094$as_echo "$ac_try_echo"; } >&5
4095 (eval "$ac_try") 2>&5
4096 ac_status=$?
4097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4098 test $ac_status = 0; }; }; then
4099 cross_compiling=no
4100 else
4101 if test "$cross_compiling" = maybe; then
4102 cross_compiling=yes
4103 else
4104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004106as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004107If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004108See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 fi
4110 fi
4111fi
4112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4113$as_echo "$cross_compiling" >&6; }
4114
4115rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4116ac_clean_files=$ac_clean_files_save
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4118$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004119if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo_n "(cached) " >&6
4121else
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004123/* end confdefs.h. */
4124
4125int
4126main ()
4127{
4128
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004134if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135case "(($ac_try" in
4136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4137 *) ac_try_echo=$ac_try;;
4138esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4140$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4144 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145 for ac_file in conftest.o conftest.obj conftest.*; do
4146 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4150 break;;
4151 esac
4152done
4153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004155sed 's/^/| /' conftest.$ac_ext >&5
4156
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004159as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004160See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004161fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4165$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166OBJEXT=$ac_cv_objext
4167ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4169$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004170if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004175
Martin v. Löwis11437992002-04-12 09:54:03 +00004176int
4177main ()
4178{
4179#ifndef __GNUC__
4180 choke me
4181#endif
4182
4183 ;
4184 return 0;
4185}
4186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 ac_compiler_gnu=yes
4189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_cv_c_compiler_gnu=$ac_compiler_gnu
4194
4195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4197$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4198if test $ac_compiler_gnu = yes; then
4199 GCC=yes
4200else
4201 GCC=
4202fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_test_CFLAGS=${CFLAGS+set}
4204ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4206$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004207if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004209else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 ac_save_c_werror_flag=$ac_c_werror_flag
4211 ac_c_werror_flag=yes
4212 ac_cv_prog_cc_g=no
4213 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
Martin v. Löwis11437992002-04-12 09:54:03 +00004217int
4218main ()
4219{
4220
4221 ;
4222 return 0;
4223}
4224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004225if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004226 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227else
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 CFLAGS=""
4229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241
Matthias Kloseb9621712010-04-24 17:59:49 +00004242else
4243 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246/* end confdefs.h. */
4247
4248int
4249main ()
4250{
4251
4252 ;
4253 return 0;
4254}
4255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264 ac_c_werror_flag=$ac_save_c_werror_flag
4265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4267$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270elif test $ac_cv_prog_cc_g = yes; then
4271 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004272 CFLAGS="-g -O2"
4273 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004274 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275 fi
4276else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004277 if test "$GCC" = yes; then
4278 CFLAGS="-O2"
4279 else
4280 CFLAGS=
4281 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4284$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004285if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004289ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* end confdefs.h. */
4292#include <stdarg.h>
4293#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004294struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4296struct buf { int x; };
4297FILE * (*rcsopen) (struct buf *, struct stat *, int);
4298static char *e (p, i)
4299 char **p;
4300 int i;
4301{
4302 return p[i];
4303}
4304static char *f (char * (*g) (char **, int), char **p, ...)
4305{
4306 char *s;
4307 va_list v;
4308 va_start (v,p);
4309 s = g (p, va_arg (v,int));
4310 va_end (v);
4311 return s;
4312}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313
4314/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4315 function prototypes and stuff, but not '\xHH' hex character constants.
4316 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4319 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4324 inside strings and character constants. */
4325#define FOO(x) 'x'
4326int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4327
Skip Montanaro6dead952003-09-25 14:50:04 +00004328int test (int i, double x);
4329struct s1 {int (*f) (int a);};
4330struct s2 {int (*f) (double a);};
4331int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4332int argc;
4333char **argv;
4334int
4335main ()
4336{
4337return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4338 ;
4339 return 0;
4340}
4341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4343 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004344do
4345 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349rm -f core conftest.err conftest.$ac_objext
4350 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004351done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004353CC=$ac_save_CC
4354
4355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356# AC_CACHE_VAL
4357case "x$ac_cv_prog_cc_c89" in
4358 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4360$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4363$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004364 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4367$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004368esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004369if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004370
Matthias Kloseb9621712010-04-24 17:59:49 +00004371fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Martin v. Löwis11437992002-04-12 09:54:03 +00004373ac_ext=c
4374ac_cpp='$CPP $CPPFLAGS'
4375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4377ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004379ac_ext=c
4380ac_cpp='$CPP $CPPFLAGS'
4381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4383ac_compiler_gnu=$ac_cv_c_compiler_gnu
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4385$as_echo_n "checking how to run the C preprocessor... " >&6; }
4386# On Suns, sometimes $CPP names a directory.
4387if test -n "$CPP" && test -d "$CPP"; then
4388 CPP=
4389fi
4390if test -z "$CPP"; then
4391 if ${ac_cv_prog_CPP+:} false; then :
4392 $as_echo_n "(cached) " >&6
4393else
4394 # Double quotes because CPP needs to be expanded
4395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4396 do
4397 ac_preproc_ok=false
4398for ac_c_preproc_warn_flag in '' yes
4399do
4400 # Use a header file that comes with gcc, so configuring glibc
4401 # with a fresh cross-compiler works.
4402 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4403 # <limits.h> exists even on freestanding compilers.
4404 # On the NeXT, cc -E runs the code through the compiler's parser,
4405 # not just through cpp. "Syntax error" is here to catch this case.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#ifdef __STDC__
4409# include <limits.h>
4410#else
4411# include <assert.h>
4412#endif
4413 Syntax error
4414_ACEOF
4415if ac_fn_c_try_cpp "$LINENO"; then :
4416
4417else
4418 # Broken: fails on valid input.
4419continue
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423 # OK, works on sane cases. Now check whether nonexistent headers
4424 # can be detected and how.
4425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4426/* end confdefs.h. */
4427#include <ac_nonexistent.h>
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430 # Broken: success on invalid input.
4431continue
4432else
4433 # Passes both tests.
4434ac_preproc_ok=:
4435break
4436fi
4437rm -f conftest.err conftest.i conftest.$ac_ext
4438
4439done
4440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4441rm -f conftest.i conftest.err conftest.$ac_ext
4442if $ac_preproc_ok; then :
4443 break
4444fi
4445
4446 done
4447 ac_cv_prog_CPP=$CPP
4448
4449fi
4450 CPP=$ac_cv_prog_CPP
4451else
4452 ac_cv_prog_CPP=$CPP
4453fi
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4455$as_echo "$CPP" >&6; }
4456ac_preproc_ok=false
4457for ac_c_preproc_warn_flag in '' yes
4458do
4459 # Use a header file that comes with gcc, so configuring glibc
4460 # with a fresh cross-compiler works.
4461 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4462 # <limits.h> exists even on freestanding compilers.
4463 # On the NeXT, cc -E runs the code through the compiler's parser,
4464 # not just through cpp. "Syntax error" is here to catch this case.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#ifdef __STDC__
4468# include <limits.h>
4469#else
4470# include <assert.h>
4471#endif
4472 Syntax error
4473_ACEOF
4474if ac_fn_c_try_cpp "$LINENO"; then :
4475
4476else
4477 # Broken: fails on valid input.
4478continue
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482 # OK, works on sane cases. Now check whether nonexistent headers
4483 # can be detected and how.
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <ac_nonexistent.h>
4487_ACEOF
4488if ac_fn_c_try_cpp "$LINENO"; then :
4489 # Broken: success on invalid input.
4490continue
4491else
4492 # Passes both tests.
4493ac_preproc_ok=:
4494break
4495fi
4496rm -f conftest.err conftest.i conftest.$ac_ext
4497
4498done
4499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4500rm -f conftest.i conftest.err conftest.$ac_ext
4501if $ac_preproc_ok; then :
4502
4503else
4504 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4506as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4507See \`config.log' for more details" "$LINENO" 5; }
4508fi
4509
4510ac_ext=c
4511ac_cpp='$CPP $CPPFLAGS'
4512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4514ac_compiler_gnu=$ac_cv_c_compiler_gnu
4515
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4517$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4518if ${ac_cv_path_GREP+:} false; then :
4519 $as_echo_n "(cached) " >&6
4520else
4521 if test -z "$GREP"; then
4522 ac_path_GREP_found=false
4523 # Loop through the user's path and test for each of PROGNAME-LIST
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4526do
4527 IFS=$as_save_IFS
4528 test -z "$as_dir" && as_dir=.
4529 for ac_prog in grep ggrep; do
4530 for ac_exec_ext in '' $ac_executable_extensions; do
4531 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4532 as_fn_executable_p "$ac_path_GREP" || continue
4533# Check for GNU ac_path_GREP and select it if it is found.
4534 # Check for GNU $ac_path_GREP
4535case `"$ac_path_GREP" --version 2>&1` in
4536*GNU*)
4537 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4538*)
4539 ac_count=0
4540 $as_echo_n 0123456789 >"conftest.in"
4541 while :
4542 do
4543 cat "conftest.in" "conftest.in" >"conftest.tmp"
4544 mv "conftest.tmp" "conftest.in"
4545 cp "conftest.in" "conftest.nl"
4546 $as_echo 'GREP' >> "conftest.nl"
4547 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4548 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4549 as_fn_arith $ac_count + 1 && ac_count=$as_val
4550 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4551 # Best one so far, save it but keep looking for a better one
4552 ac_cv_path_GREP="$ac_path_GREP"
4553 ac_path_GREP_max=$ac_count
4554 fi
4555 # 10*(2^10) chars as input seems more than enough
4556 test $ac_count -gt 10 && break
4557 done
4558 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4559esac
4560
4561 $ac_path_GREP_found && break 3
4562 done
4563 done
4564 done
4565IFS=$as_save_IFS
4566 if test -z "$ac_cv_path_GREP"; then
4567 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4568 fi
4569else
4570 ac_cv_path_GREP=$GREP
4571fi
4572
4573fi
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4575$as_echo "$ac_cv_path_GREP" >&6; }
4576 GREP="$ac_cv_path_GREP"
4577
4578
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004579
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004580
4581
Matthias Kloseb9621712010-04-24 17:59:49 +00004582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4583$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004585# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004586if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004587 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588
4589 case $withval in
4590 no) with_cxx_main=no
4591 MAINCC='$(CC)';;
4592 yes) with_cxx_main=yes
4593 MAINCC='$(CXX)';;
4594 *) with_cxx_main=yes
4595 MAINCC=$withval
4596 if test -z "$CXX"
4597 then
4598 CXX=$withval
4599 fi;;
4600 esac
4601else
4602
4603 with_cxx_main=no
4604 MAINCC='$(CC)'
4605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004606fi
4607
Matthias Kloseb9621712010-04-24 17:59:49 +00004608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4609$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
4611preset_cxx="$CXX"
4612if test -z "$CXX"
4613then
4614 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004615 gcc) if test -n "$ac_tool_prefix"; then
4616 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4617set dummy ${ac_tool_prefix}g++; ac_word=$2
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619$as_echo_n "checking for $ac_word... " >&6; }
4620if ${ac_cv_path_CXX+:} false; then :
4621 $as_echo_n "(cached) " >&6
4622else
4623 case $CXX in
4624 [\\/]* | ?:[\\/]*)
4625 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4626 ;;
4627 *)
4628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in notfound
4630do
4631 IFS=$as_save_IFS
4632 test -z "$as_dir" && as_dir=.
4633 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004635 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637 break 2
4638 fi
4639done
4640 done
4641IFS=$as_save_IFS
4642
4643 ;;
4644esac
4645fi
4646CXX=$ac_cv_path_CXX
4647if test -n "$CXX"; then
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4649$as_echo "$CXX" >&6; }
4650else
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654
4655
4656fi
4657if test -z "$ac_cv_path_CXX"; then
4658 ac_pt_CXX=$CXX
4659 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004663if ${ac_cv_path_ac_pt_CXX+:} false; then :
4664 $as_echo_n "(cached) " >&6
4665else
4666 case $ac_pt_CXX in
4667 [\\/]* | ?:[\\/]*)
4668 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4669 ;;
4670 *)
4671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4672for as_dir in notfound
4673do
4674 IFS=$as_save_IFS
4675 test -z "$as_dir" && as_dir=.
4676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4680 break 2
4681 fi
4682done
4683 done
4684IFS=$as_save_IFS
4685
4686 ;;
4687esac
4688fi
4689ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4690if test -n "$ac_pt_CXX"; then
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4692$as_echo "$ac_pt_CXX" >&6; }
4693else
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4695$as_echo "no" >&6; }
4696fi
4697
4698 if test "x$ac_pt_CXX" = x; then
4699 CXX="g++"
4700 else
4701 case $cross_compiling:$ac_tool_warned in
4702yes:)
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4705ac_tool_warned=yes ;;
4706esac
4707 CXX=$ac_pt_CXX
4708 fi
4709else
4710 CXX="$ac_cv_path_CXX"
4711fi
4712 ;;
4713 cc) if test -n "$ac_tool_prefix"; then
4714 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4715set dummy ${ac_tool_prefix}c++; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004718if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720else
4721 case $CXX in
4722 [\\/]* | ?:[\\/]*)
4723 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4724 ;;
4725 *)
4726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in notfound
4728do
4729 IFS=$as_save_IFS
4730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004735 break 2
4736 fi
4737done
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004739IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741 ;;
4742esac
4743fi
4744CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004745if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4747$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004748else
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004752
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753
4754fi
4755if test -z "$ac_cv_path_CXX"; then
4756 ac_pt_CXX=$CXX
4757 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767 ;;
4768 *)
4769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in notfound
4771do
4772 IFS=$as_save_IFS
4773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778 break 2
4779 fi
4780done
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004782IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784 ;;
4785esac
4786fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4788if test -n "$ac_pt_CXX"; then
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4790$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004791else
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4793$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004795
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 if test "x$ac_pt_CXX" = x; then
4797 CXX="c++"
4798 else
4799 case $cross_compiling:$ac_tool_warned in
4800yes:)
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4803ac_tool_warned=yes ;;
4804esac
4805 CXX=$ac_pt_CXX
4806 fi
4807else
4808 CXX="$ac_cv_path_CXX"
4809fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 clang|*/clang) if test -n "$ac_tool_prefix"; then
4812 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4813set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
4816if ${ac_cv_path_CXX+:} false; then :
4817 $as_echo_n "(cached) " >&6
4818else
4819 case $CXX in
4820 [\\/]* | ?:[\\/]*)
4821 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4822 ;;
4823 *)
4824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in notfound
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
4829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004831 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2
4834 fi
4835done
4836 done
4837IFS=$as_save_IFS
4838
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839 ;;
4840esac
4841fi
4842CXX=$ac_cv_path_CXX
4843if test -n "$CXX"; then
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4845$as_echo "$CXX" >&6; }
4846else
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848$as_echo "no" >&6; }
4849fi
4850
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851
4852fi
4853if test -z "$ac_cv_path_CXX"; then
4854 ac_pt_CXX=$CXX
4855 # Extract the first word of "clang++", so it can be a program name with args.
4856set dummy clang++; ac_word=$2
4857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4858$as_echo_n "checking for $ac_word... " >&6; }
4859if ${ac_cv_path_ac_pt_CXX+:} false; then :
4860 $as_echo_n "(cached) " >&6
4861else
4862 case $ac_pt_CXX in
4863 [\\/]* | ?:[\\/]*)
4864 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4865 ;;
4866 *)
4867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4868for as_dir in notfound
4869do
4870 IFS=$as_save_IFS
4871 test -z "$as_dir" && as_dir=.
4872 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004873 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004874 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4876 break 2
4877 fi
4878done
4879 done
4880IFS=$as_save_IFS
4881
4882 ;;
4883esac
4884fi
4885ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4886if test -n "$ac_pt_CXX"; then
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4888$as_echo "$ac_pt_CXX" >&6; }
4889else
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893
4894 if test "x$ac_pt_CXX" = x; then
4895 CXX="clang++"
4896 else
4897 case $cross_compiling:$ac_tool_warned in
4898yes:)
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4900$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4901ac_tool_warned=yes ;;
4902esac
4903 CXX=$ac_pt_CXX
4904 fi
4905else
4906 CXX="$ac_cv_path_CXX"
4907fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004908 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004909 icc|*/icc) if test -n "$ac_tool_prefix"; then
4910 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4911set dummy ${ac_tool_prefix}icpc; ac_word=$2
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913$as_echo_n "checking for $ac_word... " >&6; }
4914if ${ac_cv_path_CXX+:} false; then :
4915 $as_echo_n "(cached) " >&6
4916else
4917 case $CXX in
4918 [\\/]* | ?:[\\/]*)
4919 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4920 ;;
4921 *)
4922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in notfound
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4929 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937 ;;
4938esac
4939fi
4940CXX=$ac_cv_path_CXX
4941if test -n "$CXX"; then
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4943$as_echo "$CXX" >&6; }
4944else
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4946$as_echo "no" >&6; }
4947fi
4948
4949
4950fi
4951if test -z "$ac_cv_path_CXX"; then
4952 ac_pt_CXX=$CXX
4953 # Extract the first word of "icpc", so it can be a program name with args.
4954set dummy icpc; ac_word=$2
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956$as_echo_n "checking for $ac_word... " >&6; }
4957if ${ac_cv_path_ac_pt_CXX+:} false; then :
4958 $as_echo_n "(cached) " >&6
4959else
4960 case $ac_pt_CXX in
4961 [\\/]* | ?:[\\/]*)
4962 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4963 ;;
4964 *)
4965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966for as_dir in notfound
4967do
4968 IFS=$as_save_IFS
4969 test -z "$as_dir" && as_dir=.
4970 for ac_exec_ext in '' $ac_executable_extensions; do
4971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4972 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4974 break 2
4975 fi
4976done
4977 done
4978IFS=$as_save_IFS
4979
4980 ;;
4981esac
4982fi
4983ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4984if test -n "$ac_pt_CXX"; then
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4986$as_echo "$ac_pt_CXX" >&6; }
4987else
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
4990fi
4991
4992 if test "x$ac_pt_CXX" = x; then
4993 CXX="icpc"
4994 else
4995 case $cross_compiling:$ac_tool_warned in
4996yes:)
4997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4999ac_tool_warned=yes ;;
5000esac
5001 CXX=$ac_pt_CXX
5002 fi
5003else
5004 CXX="$ac_cv_path_CXX"
5005fi
5006 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005007 esac
5008 if test "$CXX" = "notfound"
5009 then
5010 CXX=""
5011 fi
5012fi
5013if test -z "$CXX"
5014then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005015 if test -n "$ac_tool_prefix"; then
5016 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5017 do
5018 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005022if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005024else
5025 if test -n "$CXX"; then
5026 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5027else
5028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005035 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037 break 2
5038 fi
5039done
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042
5043fi
5044fi
5045CXX=$ac_cv_prog_CXX
5046if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5048$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049else
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005052fi
5053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005055 test -n "$CXX" && break
5056 done
5057fi
5058if test -z "$CXX"; then
5059 ac_ct_CXX=$CXX
5060 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5061do
5062 # Extract the first word of "$ac_prog", so it can be a program name with args.
5063set dummy $ac_prog; ac_word=$2
5064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5065$as_echo_n "checking for $ac_word... " >&6; }
5066if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5067 $as_echo_n "(cached) " >&6
5068else
5069 if test -n "$ac_ct_CXX"; then
5070 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5071else
5072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075 IFS=$as_save_IFS
5076 test -z "$as_dir" && as_dir=.
5077 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005079 ac_cv_prog_ac_ct_CXX="$ac_prog"
5080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5081 break 2
5082 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005083done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 done
5085IFS=$as_save_IFS
5086
5087fi
5088fi
5089ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5090if test -n "$ac_ct_CXX"; then
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5092$as_echo "$ac_ct_CXX" >&6; }
5093else
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099 test -n "$ac_ct_CXX" && break
5100done
5101
5102 if test "x$ac_ct_CXX" = x; then
5103 CXX="notfound"
5104 else
5105 case $cross_compiling:$ac_tool_warned in
5106yes:)
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5109ac_tool_warned=yes ;;
5110esac
5111 CXX=$ac_ct_CXX
5112 fi
5113fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114
5115 if test "$CXX" = "notfound"
5116 then
5117 CXX=""
5118 fi
5119fi
5120if test "$preset_cxx" != "$CXX"
5121then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005122 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123
5124 By default, distutils will build C++ extension modules with \"$CXX\".
5125 If this is not intended, then set CXX on the configure command line.
5126 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005127$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128
5129 By default, distutils will build C++ extension modules with \"$CXX\".
5130 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005131 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132fi
5133
5134
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005135MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5136
5137
5138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5139$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5140cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005141#undef bfin
5142#undef cris
5143#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005144#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005145#undef hppa
5146#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005147#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005148#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005149#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005151#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005152#if defined(__ANDROID__)
5153# if defined(__x86_64__) && defined(__LP64__)
5154 x86_64-linux-android
5155# elif defined(__i386__)
5156 i686-linux-android
5157# elif defined(__aarch64__) && defined(__AARCH64EL__)
5158# if defined(__ILP32__)
5159 aarch64_ilp32-linux-android
5160# else
5161 aarch64-linux-android
5162# endif
5163# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5164 arm-linux-androideabi
5165# elif defined(__mips_hard_float) && defined(_MIPSEL)
5166# if _MIPS_SIM == _ABIO32
5167 mipsel-linux-android
5168# elif _MIPS_SIM == _ABI64
5169 mips64el-linux-android
5170# else
5171# error unknown platform triplet
5172# endif
5173# else
5174# error unknown platform triplet
5175# endif
5176#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005177# if defined(__x86_64__) && defined(__LP64__)
5178 x86_64-linux-gnu
5179# elif defined(__x86_64__) && defined(__ILP32__)
5180 x86_64-linux-gnux32
5181# elif defined(__i386__)
5182 i386-linux-gnu
5183# elif defined(__aarch64__) && defined(__AARCH64EL__)
5184# if defined(__ILP32__)
5185 aarch64_ilp32-linux-gnu
5186# else
5187 aarch64-linux-gnu
5188# endif
5189# elif defined(__aarch64__) && defined(__AARCH64EB__)
5190# if defined(__ILP32__)
5191 aarch64_be_ilp32-linux-gnu
5192# else
5193 aarch64_be-linux-gnu
5194# endif
5195# elif defined(__alpha__)
5196 alpha-linux-gnu
5197# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5198# if defined(__ARMEL__)
5199 arm-linux-gnueabihf
5200# else
5201 armeb-linux-gnueabihf
5202# endif
5203# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5204# if defined(__ARMEL__)
5205 arm-linux-gnueabi
5206# else
5207 armeb-linux-gnueabi
5208# endif
5209# elif defined(__hppa__)
5210 hppa-linux-gnu
5211# elif defined(__ia64__)
5212 ia64-linux-gnu
5213# elif defined(__m68k__) && !defined(__mcoldfire__)
5214 m68k-linux-gnu
5215# elif defined(__mips_hard_float) && defined(_MIPSEL)
5216# if _MIPS_SIM == _ABIO32
5217 mipsel-linux-gnu
5218# elif _MIPS_SIM == _ABIN32
5219 mips64el-linux-gnuabin32
5220# elif _MIPS_SIM == _ABI64
5221 mips64el-linux-gnuabi64
5222# else
5223# error unknown platform triplet
5224# endif
5225# elif defined(__mips_hard_float)
5226# if _MIPS_SIM == _ABIO32
5227 mips-linux-gnu
5228# elif _MIPS_SIM == _ABIN32
5229 mips64-linux-gnuabin32
5230# elif _MIPS_SIM == _ABI64
5231 mips64-linux-gnuabi64
5232# else
5233# error unknown platform triplet
5234# endif
5235# elif defined(__or1k__)
5236 or1k-linux-gnu
5237# elif defined(__powerpc__) && defined(__SPE__)
5238 powerpc-linux-gnuspe
5239# elif defined(__powerpc64__)
5240# if defined(__LITTLE_ENDIAN__)
5241 powerpc64le-linux-gnu
5242# else
5243 powerpc64-linux-gnu
5244# endif
5245# elif defined(__powerpc__)
5246 powerpc-linux-gnu
5247# elif defined(__s390x__)
5248 s390x-linux-gnu
5249# elif defined(__s390__)
5250 s390-linux-gnu
5251# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5252 sh4-linux-gnu
5253# elif defined(__sparc__) && defined(__arch64__)
5254 sparc64-linux-gnu
5255# elif defined(__sparc__)
5256 sparc-linux-gnu
5257# else
5258# error unknown platform triplet
5259# endif
5260#elif defined(__FreeBSD_kernel__)
5261# if defined(__LP64__)
5262 x86_64-kfreebsd-gnu
5263# elif defined(__i386__)
5264 i386-kfreebsd-gnu
5265# else
5266# error unknown platform triplet
5267# endif
5268#elif defined(__gnu_hurd__)
5269 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005270#elif defined(__APPLE__)
5271 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005272#else
5273# error unknown platform triplet
5274#endif
5275
5276EOF
5277
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005278if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005279 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5281$as_echo "$PLATFORM_TRIPLET" >&6; }
5282else
5283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5284$as_echo "none" >&6; }
5285fi
5286rm -f conftest.c conftest.out
5287
5288if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5289 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5290 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5291 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005292elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5293 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005294fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005295if test x$PLATFORM_TRIPLET = x; then
5296 PLATDIR=plat-$MACHDEP
5297else
5298 PLATDIR=plat-$PLATFORM_TRIPLET
5299fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300
5301
doko@ubuntu.com55532312016-06-14 08:55:19 +02005302if test x$MULTIARCH != x; then
5303 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5304fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305
5306
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5308$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5309save_LDFLAGS="$LDFLAGS"
5310LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005311
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313/* end confdefs.h. */
5314
5315int
5316main ()
5317{
5318
5319 ;
5320 return 0;
5321}
5322_ACEOF
5323if ac_fn_c_try_link "$LINENO"; then :
5324 NO_AS_NEEDED="-Wl,--no-as-needed"
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5326$as_echo "yes" >&6; }
5327else
5328 NO_AS_NEEDED=""
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332rm -f core conftest.err conftest.$ac_objext \
5333 conftest$ac_exeext conftest.$ac_ext
5334LDFLAGS="$save_LDFLAGS"
5335
5336
5337
5338# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005339
Matthias Kloseb9621712010-04-24 17:59:49 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5341$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005342if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005343 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344else
5345 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5346 then ac_cv_path_EGREP="$GREP -E"
5347 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 # Loop through the user's path and test for each of PROGNAME-LIST
5351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005352for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5353do
5354 IFS=$as_save_IFS
5355 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 for ac_prog in egrep; do
5357 for ac_exec_ext in '' $ac_executable_extensions; do
5358 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005359 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005360# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361 # Check for GNU $ac_path_EGREP
5362case `"$ac_path_EGREP" --version 2>&1` in
5363*GNU*)
5364 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5365*)
5366 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368 while :
5369 do
5370 cat "conftest.in" "conftest.in" >"conftest.tmp"
5371 mv "conftest.tmp" "conftest.in"
5372 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5375 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5378 # Best one so far, save it but keep looking for a better one
5379 ac_cv_path_EGREP="$ac_path_EGREP"
5380 ac_path_EGREP_max=$ac_count
5381 fi
5382 # 10*(2^10) chars as input seems more than enough
5383 test $ac_count -gt 10 && break
5384 done
5385 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5386esac
5387
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $ac_path_EGREP_found && break 3
5389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005394 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396else
5397 ac_cv_path_EGREP=$EGREP
5398fi
5399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 fi
5401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5403$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005405
5406
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5408$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005409if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n "(cached) " >&6
5411else
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005413/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005414#include <stdlib.h>
5415#include <stdarg.h>
5416#include <string.h>
5417#include <float.h>
5418
5419int
5420main ()
5421{
5422
5423 ;
5424 return 0;
5425}
5426_ACEOF
5427if ac_fn_c_try_compile "$LINENO"; then :
5428 ac_cv_header_stdc=yes
5429else
5430 ac_cv_header_stdc=no
5431fi
5432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5433
5434if test $ac_cv_header_stdc = yes; then
5435 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5437/* end confdefs.h. */
5438#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005439
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005444else
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005447rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448
Matthias Kloseb9621712010-04-24 17:59:49 +00005449fi
5450
5451if test $ac_cv_header_stdc = yes; then
5452 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5454/* end confdefs.h. */
5455#include <stdlib.h>
5456
5457_ACEOF
5458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5459 $EGREP "free" >/dev/null 2>&1; then :
5460
5461else
5462 ac_cv_header_stdc=no
5463fi
5464rm -f conftest*
5465
5466fi
5467
5468if test $ac_cv_header_stdc = yes; then
5469 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5470 if test "$cross_compiling" = yes; then :
5471 :
5472else
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <ctype.h>
5476#include <stdlib.h>
5477#if ((' ' & 0x0FF) == 0x020)
5478# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5479# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5480#else
5481# define ISLOWER(c) \
5482 (('a' <= (c) && (c) <= 'i') \
5483 || ('j' <= (c) && (c) <= 'r') \
5484 || ('s' <= (c) && (c) <= 'z'))
5485# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5486#endif
5487
5488#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5489int
5490main ()
5491{
5492 int i;
5493 for (i = 0; i < 256; i++)
5494 if (XOR (islower (i), ISLOWER (i))
5495 || toupper (i) != TOUPPER (i))
5496 return 2;
5497 return 0;
5498}
5499_ACEOF
5500if ac_fn_c_try_run "$LINENO"; then :
5501
5502else
5503 ac_cv_header_stdc=no
5504fi
5505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5506 conftest.$ac_objext conftest.beam conftest.$ac_ext
5507fi
5508
5509fi
5510fi
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5512$as_echo "$ac_cv_header_stdc" >&6; }
5513if test $ac_cv_header_stdc = yes; then
5514
5515$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5516
5517fi
5518
5519# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5520for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5521 inttypes.h stdint.h unistd.h
5522do :
5523 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5524ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5525"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005526if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 cat >>confdefs.h <<_ACEOF
5528#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5529_ACEOF
5530
5531fi
5532
5533done
5534
5535
5536
5537 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005538if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005539 MINIX=yes
5540else
5541 MINIX=
5542fi
5543
5544
5545 if test "$MINIX" = yes; then
5546
5547$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5548
5549
5550$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5551
5552
5553$as_echo "#define _MINIX 1" >>confdefs.h
5554
5555 fi
5556
5557
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5559$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005560if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 $as_echo_n "(cached) " >&6
5562else
5563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5564/* end confdefs.h. */
5565
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005566# define __EXTENSIONS__ 1
5567 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005568int
5569main ()
5570{
5571
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576if ac_fn_c_try_compile "$LINENO"; then :
5577 ac_cv_safe_to_define___extensions__=yes
5578else
5579 ac_cv_safe_to_define___extensions__=no
5580fi
5581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582fi
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5584$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5585 test $ac_cv_safe_to_define___extensions__ = yes &&
5586 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5587
5588 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5589
5590 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5591
5592 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5593
5594 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5595
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
Xavier de Gaye95750b12016-07-09 11:05:42 +02005598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5599$as_echo_n "checking for the Android API level... " >&6; }
5600cat >> conftest.c <<EOF
5601#ifdef __ANDROID__
5602#include <android/api-level.h>
5603__ANDROID_API__
5604#else
5605#error not Android
5606#endif
5607EOF
5608
5609if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5610 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5612$as_echo "$ANDROID_API_LEVEL" >&6; }
5613
5614cat >>confdefs.h <<_ACEOF
5615#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5616_ACEOF
5617
5618else
5619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5620$as_echo "not Android" >&6; }
5621fi
5622rm -f conftest.c conftest.out
5623
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624# Check for unsupported systems
5625case $ac_sys_system/$ac_sys_release in
5626atheos*|Linux*/1*)
5627 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5628 echo See README for details.
5629 exit 1;;
5630esac
5631
5632
Matthias Kloseb9621712010-04-24 17:59:49 +00005633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5634$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
5636# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005637if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 withval=$with_suffix;
5639 case $withval in
5640 no) EXEEXT=;;
5641 yes) EXEEXT=.exe;;
5642 *) EXEEXT=$withval;;
5643 esac
5644fi
5645
Matthias Kloseb9621712010-04-24 17:59:49 +00005646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5647$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
5649# Test whether we're running on a non-case-sensitive system, in which
5650# case we give a warning if no ext is given
5651
Matthias Kloseb9621712010-04-24 17:59:49 +00005652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5653$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654if test ! -d CaseSensitiveTestDir; then
5655mkdir CaseSensitiveTestDir
5656fi
5657
5658if test -d casesensitivetestdir
5659then
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5661$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 BUILDEXEEXT=.exe
5663else
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5665$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 BUILDEXEEXT=$EXEEXT
5667fi
5668rmdir CaseSensitiveTestDir
5669
5670case $MACHDEP in
5671bsdos*)
5672 case $CC in
5673 gcc) CC="$CC -D_HAVE_BSDI";;
5674 esac;;
5675esac
5676
5677case $ac_sys_system in
5678hp*|HP*)
5679 case $CC in
5680 cc|*/cc) CC="$CC -Ae";;
5681 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682esac
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5686$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687if test -z "$LIBRARY"
5688then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005689 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5692$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694# LDLIBRARY is the name of the library to link against (as opposed to the
5695# name of the library into which to insert object files). BLDLIBRARY is also
5696# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5697# is blank as the main program is not linked directly against LDLIBRARY.
5698# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5699# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5700# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5701# DLLLIBRARY is the shared (i.e., DLL) library.
5702#
5703# RUNSHARED is used to run shared python without installed libraries
5704#
5705# INSTSONAME is the name of the shared library that will be use to install
5706# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005707#
5708# LDVERSION is the shared library version number, normally the Python version
5709# with the ABI build flags appended.
5710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711
5712
5713
5714
5715
5716
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718LDLIBRARY="$LIBRARY"
5719BLDLIBRARY='$(LDLIBRARY)'
5720INSTSONAME='$(LDLIBRARY)'
5721DLLLIBRARY=''
5722LDLIBRARYDIR=''
5723RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005724LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725
5726# LINKCC is the command that links the python executable -- default is $(CC).
5727# If CXX is set, and if it is needed to link a main function that was
5728# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5729# python might then depend on the C++ runtime
5730# This is altered for AIX in order to build the export list before
5731# linking.
5732
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5734$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735if test -z "$LINKCC"
5736then
5737 LINKCC='$(PURIFY) $(MAINCC)'
5738 case $ac_sys_system in
5739 AIX*)
5740 exp_extra="\"\""
5741 if test $ac_sys_release -ge 5 -o \
5742 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5743 exp_extra="."
5744 fi
5745 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746 QNX*)
5747 # qcc must be used because the other compilers do not
5748 # support -N.
5749 LINKCC=qcc;;
5750 esac
5751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5753$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
5755# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5756# make sure we default having it set to "no": this is used by
5757# distutils.unixccompiler to know if it should add --enable-new-dtags
5758# to linker command lines, and failing to detect GNU ld simply results
5759# in the same bahaviour as before.
5760
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5762$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763ac_prog=ld
5764if test "$GCC" = yes; then
5765 ac_prog=`$CC -print-prog-name=ld`
5766fi
5767case `"$ac_prog" -V 2>&1 < /dev/null` in
5768 *GNU*)
5769 GNULD=yes;;
5770 *)
5771 GNULD=no;;
5772esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5774$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5777$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005778if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005779 $as_echo_n "(cached) " >&6
5780else
5781 ac_cv_c_inline=no
5782for ac_kw in inline __inline__ __inline; do
5783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5784/* end confdefs.h. */
5785#ifndef __cplusplus
5786typedef int foo_t;
5787static $ac_kw foo_t static_foo () {return 0; }
5788$ac_kw foo_t foo () {return 0; }
5789#endif
5790
5791_ACEOF
5792if ac_fn_c_try_compile "$LINENO"; then :
5793 ac_cv_c_inline=$ac_kw
5794fi
5795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796 test "$ac_cv_c_inline" != no && break
5797done
5798
5799fi
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5801$as_echo "$ac_cv_c_inline" >&6; }
5802
5803case $ac_cv_c_inline in
5804 inline | yes) ;;
5805 *)
5806 case $ac_cv_c_inline in
5807 no) ac_val=;;
5808 *) ac_val=$ac_cv_c_inline;;
5809 esac
5810 cat >>confdefs.h <<_ACEOF
5811#ifndef __cplusplus
5812#define inline $ac_val
5813#endif
5814_ACEOF
5815 ;;
5816esac
5817
5818if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005819
5820$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005821
5822
5823fi
5824
5825
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5827$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005829if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830 enableval=$enable_shared;
5831fi
5832
5833
5834if test -z "$enable_shared"
5835then
5836 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005837 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838 enable_shared="yes";;
5839 *)
5840 enable_shared="no";;
5841 esac
5842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5844$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5847$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005849if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005850 enableval=$enable_profiling;
5851fi
5852
5853if test "x$enable_profiling" = xyes; then
5854 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005855 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857/* end confdefs.h. */
5858int main() { return 0; }
5859_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005860if ac_fn_c_try_link "$LINENO"; then :
5861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005863 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865rm -f core conftest.err conftest.$ac_objext \
5866 conftest$ac_exeext conftest.$ac_ext
5867 CC="$ac_save_cc"
5868else
5869 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5872$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873
doko@ubuntu.comba015832012-06-30 16:52:05 +02005874if test "x$enable_profiling" = xyes; then
5875 BASECFLAGS="-pg $BASECFLAGS"
5876 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
5878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5880$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
5882# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5883# library that we build, but we do not want to link against it (we
5884# will find it with a -framework option). For this reason there is an
5885# extra variable BLDLIBRARY against which Python and the extension
5886# modules are linked, BLDLIBRARY. This is normally the same as
5887# LDLIBRARY, but empty for MacOSX framework builds.
5888if test "$enable_framework"
5889then
5890 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005891 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 BLDLIBRARY=''
5893else
5894 BLDLIBRARY='$(LDLIBRARY)'
5895fi
5896
5897# Other platforms follow
5898if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005899 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
Matthias Kloseb9621712010-04-24 17:59:49 +00005901$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902
5903 case $ac_sys_system in
5904 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).dll.a'
5906 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 ;;
5908 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005909 LDLIBRARY='libpython$(LDVERSION).so'
5910 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005911 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005913 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005914 then
5915 PY3LIBRARY=libpython3.so
5916 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005918 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005919 LDLIBRARY='libpython$(LDVERSION).so'
5920 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005923 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005924 then
5925 PY3LIBRARY=libpython3.so
5926 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
5928 hp*|HP*)
5929 case `uname -m` in
5930 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005931 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005938 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005941 LDLIBRARY='libpython$(LDVERSION).dylib'
5942 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005945 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005947 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005948 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
5950 esac
5951else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005952 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 case $ac_sys_system in
5954 CYGWIN*)
5955 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005956 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 ;;
5958 esac
5959fi
5960
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005961if test "$cross_compiling" = yes; then
5962 RUNSHARED=
5963fi
5964
Matthias Kloseb9621712010-04-24 17:59:49 +00005965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5966$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967
5968if test -n "$ac_tool_prefix"; then
5969 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5970set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005973if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975else
5976 if test -n "$RANLIB"; then
5977 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5978else
5979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5980for as_dir in $PATH
5981do
5982 IFS=$as_save_IFS
5983 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005985 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 break 2
5989 fi
5990done
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992IFS=$as_save_IFS
5993
5994fi
5995fi
5996RANLIB=$ac_cv_prog_RANLIB
5997if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5999$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000else
Matthias Kloseb9621712010-04-24 17:59:49 +00006001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6002$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003fi
6004
6005
6006fi
6007if test -z "$ac_cv_prog_RANLIB"; then
6008 ac_ct_RANLIB=$RANLIB
6009 # Extract the first word of "ranlib", so it can be a program name with args.
6010set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6012$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006013if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
6016 if test -n "$ac_ct_RANLIB"; then
6017 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6018else
6019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6020for as_dir in $PATH
6021do
6022 IFS=$as_save_IFS
6023 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006025 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 break 2
6029 fi
6030done
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032IFS=$as_save_IFS
6033
6034fi
6035fi
6036ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6037if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6039$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040else
Matthias Kloseb9621712010-04-24 17:59:49 +00006041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6042$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043fi
6044
6045 if test "x$ac_ct_RANLIB" = x; then
6046 RANLIB=":"
6047 else
6048 case $cross_compiling:$ac_tool_warned in
6049yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052ac_tool_warned=yes ;;
6053esac
6054 RANLIB=$ac_ct_RANLIB
6055 fi
6056else
6057 RANLIB="$ac_cv_prog_RANLIB"
6058fi
6059
6060
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006061if test -n "$ac_tool_prefix"; then
6062 for ac_prog in ar aal
6063 do
6064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006068if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070else
6071 if test -n "$AR"; then
6072 ac_cv_prog_AR="$AR" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006081 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083 break 2
6084 fi
6085done
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087IFS=$as_save_IFS
6088
6089fi
6090fi
6091AR=$ac_cv_prog_AR
6092if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6094$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095else
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098fi
6099
6100
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006101 test -n "$AR" && break
6102 done
6103fi
6104if test -z "$AR"; then
6105 ac_ct_AR=$AR
6106 for ac_prog in ar aal
6107do
6108 # Extract the first word of "$ac_prog", so it can be a program name with args.
6109set dummy $ac_prog; ac_word=$2
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if ${ac_cv_prog_ac_ct_AR+:} false; then :
6113 $as_echo_n "(cached) " >&6
6114else
6115 if test -n "$ac_ct_AR"; then
6116 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6117else
6118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006125 ac_cv_prog_ac_ct_AR="$ac_prog"
6126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127 break 2
6128 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130 done
6131IFS=$as_save_IFS
6132
6133fi
6134fi
6135ac_ct_AR=$ac_cv_prog_ac_ct_AR
6136if test -n "$ac_ct_AR"; then
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6138$as_echo "$ac_ct_AR" >&6; }
6139else
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145 test -n "$ac_ct_AR" && break
6146done
6147
6148 if test "x$ac_ct_AR" = x; then
6149 AR="ar"
6150 else
6151 case $cross_compiling:$ac_tool_warned in
6152yes:)
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6155ac_tool_warned=yes ;;
6156esac
6157 AR=$ac_ct_AR
6158 fi
6159fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160
6161
6162# tweak ARFLAGS only if the user didn't set it on the command line
6163
6164if test -z "$ARFLAGS"
6165then
6166 ARFLAGS="rc"
6167fi
6168
doko@ubuntu.com58844492012-06-30 18:25:32 +02006169if test -n "$ac_tool_prefix"; then
6170 for ac_prog in readelf
6171 do
6172 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6173set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6175$as_echo_n "checking for $ac_word... " >&6; }
6176if ${ac_cv_prog_READELF+:} false; then :
6177 $as_echo_n "(cached) " >&6
6178else
6179 if test -n "$READELF"; then
6180 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6181else
6182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH
6184do
6185 IFS=$as_save_IFS
6186 test -z "$as_dir" && as_dir=.
6187 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006189 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6191 break 2
6192 fi
6193done
6194 done
6195IFS=$as_save_IFS
6196
6197fi
6198fi
6199READELF=$ac_cv_prog_READELF
6200if test -n "$READELF"; then
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6202$as_echo "$READELF" >&6; }
6203else
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205$as_echo "no" >&6; }
6206fi
6207
6208
6209 test -n "$READELF" && break
6210 done
6211fi
6212if test -z "$READELF"; then
6213 ac_ct_READELF=$READELF
6214 for ac_prog in readelf
6215do
6216 # Extract the first word of "$ac_prog", so it can be a program name with args.
6217set dummy $ac_prog; ac_word=$2
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6219$as_echo_n "checking for $ac_word... " >&6; }
6220if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6221 $as_echo_n "(cached) " >&6
6222else
6223 if test -n "$ac_ct_READELF"; then
6224 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6225else
6226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227for as_dir in $PATH
6228do
6229 IFS=$as_save_IFS
6230 test -z "$as_dir" && as_dir=.
6231 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006232 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006233 ac_cv_prog_ac_ct_READELF="$ac_prog"
6234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6235 break 2
6236 fi
6237done
6238 done
6239IFS=$as_save_IFS
6240
6241fi
6242fi
6243ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6244if test -n "$ac_ct_READELF"; then
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6246$as_echo "$ac_ct_READELF" >&6; }
6247else
6248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6249$as_echo "no" >&6; }
6250fi
6251
6252
6253 test -n "$ac_ct_READELF" && break
6254done
6255
6256 if test "x$ac_ct_READELF" = x; then
6257 READELF=":"
6258 else
6259 case $cross_compiling:$ac_tool_warned in
6260yes:)
6261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6263ac_tool_warned=yes ;;
6264esac
6265 READELF=$ac_ct_READELF
6266 fi
6267fi
6268
6269if test "$cross_compiling" = yes; then
6270 case "$READELF" in
6271 readelf|:)
6272 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6273 ;;
6274 esac
6275fi
6276
6277
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279case $MACHDEP in
6280bsdos*|hp*|HP*)
6281 # install -d does not work on BSDI or HP-UX
6282 if test -z "$INSTALL"
6283 then
6284 INSTALL="${srcdir}/install-sh -c"
6285 fi
6286esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287# Find a good install program. We prefer a C program (faster),
6288# so one script is as good as another. But avoid the broken or
6289# incompatible versions:
6290# SysV /etc/install, /usr/sbin/install
6291# SunOS /usr/etc/install
6292# IRIX /sbin/install
6293# AIX /bin/install
6294# AmigaOS /C/install, which installs bootblocks on floppy discs
6295# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6296# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6297# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6298# OS/2's system install, which has a completely different semantic
6299# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006300# Reject install programs that cannot install multiple files.
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6302$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006304if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006305 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306else
6307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6308for as_dir in $PATH
6309do
6310 IFS=$as_save_IFS
6311 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006312 # Account for people who put trailing slashes in PATH elements.
6313case $as_dir/ in #((
6314 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 /usr/ucb/* ) ;;
6318 *)
6319 # OSF1 and SCO ODT 3.0 have their own names for install.
6320 # Don't use installbsd from OSF since it installs stuff as root
6321 # by default.
6322 for ac_prog in ginstall scoinst install; do
6323 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006324 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 if test $ac_prog = install &&
6326 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6327 # AIX install. It has an incompatible calling convention.
6328 :
6329 elif test $ac_prog = install &&
6330 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6331 # program-specific install script used by HP pwplus--don't use.
6332 :
6333 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 rm -rf conftest.one conftest.two conftest.dir
6335 echo one > conftest.one
6336 echo two > conftest.two
6337 mkdir conftest.dir
6338 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6339 test -s conftest.one && test -s conftest.two &&
6340 test -s conftest.dir/conftest.one &&
6341 test -s conftest.dir/conftest.two
6342 then
6343 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6344 break 3
6345 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346 fi
6347 fi
6348 done
6349 done
6350 ;;
6351esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006352
6353 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006354IFS=$as_save_IFS
6355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357
6358fi
6359 if test "${ac_cv_path_install+set}" = set; then
6360 INSTALL=$ac_cv_path_install
6361 else
6362 # As a last resort, use the slow shell script. Don't cache a
6363 # value for INSTALL within a source directory, because that will
6364 # break other packages using the cache if that directory is
6365 # removed, or if the value is a relative name.
6366 INSTALL=$ac_install_sh
6367 fi
6368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6370$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
6372# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6373# It thinks the first close brace ends the variable substitution.
6374test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6375
6376test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6377
6378test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6379
Matthias Klose93a0ef12012-03-15 18:08:34 +01006380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6381$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6382if test -z "$MKDIR_P"; then
6383 if ${ac_cv_path_mkdir+:} false; then :
6384 $as_echo_n "(cached) " >&6
6385else
6386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6388do
6389 IFS=$as_save_IFS
6390 test -z "$as_dir" && as_dir=.
6391 for ac_prog in mkdir gmkdir; do
6392 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006393 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006394 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6395 'mkdir (GNU coreutils) '* | \
6396 'mkdir (coreutils) '* | \
6397 'mkdir (fileutils) '4.1*)
6398 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6399 break 3;;
6400 esac
6401 done
6402 done
6403 done
6404IFS=$as_save_IFS
6405
6406fi
6407
6408 test -d ./--version && rmdir ./--version
6409 if test "${ac_cv_path_mkdir+set}" = set; then
6410 MKDIR_P="$ac_cv_path_mkdir -p"
6411 else
6412 # As a last resort, use the slow shell script. Don't cache a
6413 # value for MKDIR_P within a source directory, because that will
6414 # break other packages using the cache if that directory is
6415 # removed, or if the value is a relative name.
6416 MKDIR_P="$ac_install_sh -d"
6417 fi
6418fi
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6420$as_echo "$MKDIR_P" >&6; }
6421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422
6423# Not every filesystem supports hard links
6424
6425if test -z "$LN" ; then
6426 case $ac_sys_system in
6427 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 *) LN=ln;;
6429 esac
6430fi
6431
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006432# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006433
6434ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6438$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006439
6440# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006441if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442 withval=$with_pydebug;
6443if test "$withval" != no
6444then
6445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447
Matthias Kloseb9621712010-04-24 17:59:49 +00006448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6449$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006451 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006452else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006454fi
6455else
Matthias Kloseb9621712010-04-24 17:59:49 +00006456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458fi
6459
6460
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006461# Enable LTO flags
6462
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6464$as_echo_n "checking for --with-lto... " >&6; }
6465
6466# Check whether --with-lto was given.
6467if test "${with_lto+set}" = set; then :
6468 withval=$with_lto;
6469if test "$withval" != no
6470then
6471 Py_LTO='true'
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6473$as_echo "yes" >&6; };
6474else
6475 Py_LTO='false'
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477$as_echo "no" >&6; };
6478fi
6479else
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; }
6482fi
6483
6484if test "$Py_LTO" = 'true' ; then
6485 case $CC in
6486 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006487 case $ac_sys_system in
6488 Darwin*)
6489 # Any changes made here should be reflected in the GCC+Darwin case below
6490 LTOFLAGS="-flto -Wl,-export_dynamic"
6491 ;;
6492 *)
6493 LTOFLAGS="-flto"
6494 ;;
6495 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006496 ;;
6497 *gcc*)
6498 case $ac_sys_system in
6499 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006500 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006501 ;;
6502 *)
6503 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6504 ;;
6505 esac
6506 ;;
6507 esac
6508fi
6509
Brett Cannon7188a3e2015-09-18 15:13:44 -07006510# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006511
6512
6513
6514
6515
6516
Brett Cannon7188a3e2015-09-18 15:13:44 -07006517# Extract the first word of "llvm-profdata", so it can be a program name with args.
6518set dummy llvm-profdata; ac_word=$2
6519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6520$as_echo_n "checking for $ac_word... " >&6; }
6521if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6522 $as_echo_n "(cached) " >&6
6523else
6524 if test -n "$LLVM_PROF_FOUND"; then
6525 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6526else
6527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528for as_dir in $PATH
6529do
6530 IFS=$as_save_IFS
6531 test -z "$as_dir" && as_dir=.
6532 for ac_exec_ext in '' $ac_executable_extensions; do
6533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6534 ac_cv_prog_LLVM_PROF_FOUND="found"
6535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536 break 2
6537 fi
6538done
6539 done
6540IFS=$as_save_IFS
6541
6542 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6543fi
6544fi
6545LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6546if test -n "$LLVM_PROF_FOUND"; then
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6548$as_echo "$LLVM_PROF_FOUND" >&6; }
6549else
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
6552fi
6553
6554
6555LLVM_PROF_ERR=no
6556case $CC in
6557 *clang*)
6558 # Any changes made here should be reflected in the GCC+Darwin case below
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 *gcc*)
6569 case $ac_sys_system in
6570 Darwin*)
6571 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6572 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6573 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6574 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6575 if test $LLVM_PROF_FOUND = not-found
6576 then
6577 LLVM_PROF_ERR=yes
6578 fi
6579 ;;
6580 *)
6581 PGO_PROF_GEN_FLAG="-fprofile-generate"
6582 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6583 LLVM_PROF_MERGER="true"
6584 LLVM_PROF_FILE=""
6585 ;;
6586 esac
6587 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006588 *icc*)
6589 PGO_PROF_GEN_FLAG="-prof-gen"
6590 PGO_PROF_USE_FLAG="-prof-use"
6591 LLVM_PROF_MERGER="true"
6592 LLVM_PROF_FILE=""
6593 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006594esac
6595
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006596# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6597# merged with this chunk of code?
6598
6599# Optimizer/debugger flags
6600# ------------------------
6601# (The following bit of code is complicated enough - please keep things
6602# indented properly. Just pretend you're editing Python code. ;-)
6603
6604# There are two parallel sets of case statements below, one that checks to
6605# see if OPT was set and one that does BASECFLAGS setting based upon
6606# compiler and platform. BASECFLAGS tweaks need to be made even if the
6607# user set OPT.
6608
6609# tweak OPT based on compiler and platform, only if the user didn't set
6610# it on the command line
6611
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006612if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613then
6614 case $GCC in
6615 yes)
6616 if test "$CC" != 'g++' ; then
6617 STRICT_PROTO="-Wstrict-prototypes"
6618 fi
6619 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6620 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6621 WRAP="-fwrapv"
6622 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006623
6624 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006625 case $CC in
6626 *clang*) WRAP="-fwrapv"
6627 ;;
6628 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006630 case $ac_cv_prog_cc_g in
6631 yes)
6632 if test "$Py_DEBUG" = 'true' ; then
6633 # Optimization messes up debuggers, so turn it off for
6634 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006635 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6636 OPT="-g -Og -Wall $STRICT_PROTO"
6637 else
6638 OPT="-g -O0 -Wall $STRICT_PROTO"
6639 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640 else
6641 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6642 fi
6643 ;;
6644 *)
6645 OPT="-O3 -Wall $STRICT_PROTO"
6646 ;;
6647 esac
6648 case $ac_sys_system in
6649 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6650 ;;
6651 esac
6652 ;;
6653
6654 *)
6655 OPT="-O"
6656 ;;
6657 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658fi
6659
6660
6661
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006662
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006663# The -arch flags for universal builds on OSX
6664UNIVERSAL_ARCH_FLAGS=
6665
6666
6667# tweak BASECFLAGS based on compiler and platform
6668case $GCC in
6669yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006670 # Python doesn't violate C99 aliasing rules, but older versions of
6671 # GCC produce warnings for legal Python code. Enable
6672 # -fno-strict-aliasing on versions of GCC that support but produce
6673 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6675$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676 ac_save_cc="$CC"
6677 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006678 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006679 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006681else
Matthias Kloseb9621712010-04-24 17:59:49 +00006682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006684
Matthias Kloseb159a552010-04-25 21:00:44 +00006685
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006686int
6687main ()
6688{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006689
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006690 ;
6691 return 0;
6692}
Matthias Kloseb159a552010-04-25 21:00:44 +00006693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006695if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006696
6697 CC="$ac_save_cc -fstrict-aliasing"
6698 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006700/* end confdefs.h. */
6701
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006702 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006703int
6704main ()
6705{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006706double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006707 ;
6708 return 0;
6709}
Matthias Kloseb159a552010-04-25 21:00:44 +00006710
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006712if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006713
6714 ac_cv_no_strict_aliasing=no
6715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716else
Matthias Kloseb159a552010-04-25 21:00:44 +00006717
6718 ac_cv_no_strict_aliasing=yes
6719
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006720fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006722
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006723else
Matthias Kloseb159a552010-04-25 21:00:44 +00006724
6725 ac_cv_no_strict_aliasing=no
6726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006729fi
6730
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006731 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6734$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006735 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736 then
6737 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6738 fi
6739
Zachary Ware5af85642015-12-21 12:09:17 -06006740 # ICC doesn't recognize the option, but only emits a warning
6741 ## XXX does it emit an unused result warning and can it be disabled?
6742 case "$CC" in
6743 *icc*)
6744 ac_cv_disable_unused_result_warning=no
6745 ;;
6746 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6748$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6749 ac_save_cc="$CC"
6750 CC="$CC -Wunused-result -Werror"
6751 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006752 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006753 $as_echo_n "(cached) " >&6
6754else
6755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756/* end confdefs.h. */
6757
6758
6759int
6760main ()
6761{
6762
6763 ;
6764 return 0;
6765}
6766
6767_ACEOF
6768if ac_fn_c_try_compile "$LINENO"; then :
6769
6770 ac_cv_disable_unused_result_warning=yes
6771
6772else
6773
6774 ac_cv_disable_unused_result_warning=no
6775
6776fi
6777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6778fi
6779
6780 CFLAGS="$save_CFLAGS"
6781 CC="$ac_save_cc"
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6783$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006784 ;;
6785 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006786
6787 if test $ac_cv_disable_unused_result_warning = yes
6788 then
6789 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6790 fi
6791
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6793$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6794 ac_save_cc="$CC"
6795 CC="$CC -Werror=declaration-after-statement"
6796 save_CFLAGS="$CFLAGS"
6797 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6798 $as_echo_n "(cached) " >&6
6799else
6800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6801/* end confdefs.h. */
6802
6803
6804int
6805main ()
6806{
6807
6808 ;
6809 return 0;
6810}
6811
6812_ACEOF
6813if ac_fn_c_try_compile "$LINENO"; then :
6814
6815 ac_cv_declaration_after_statement_warning=yes
6816
6817else
6818
6819 ac_cv_declaration_after_statement_warning=no
6820
6821fi
6822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6823fi
6824
6825 CFLAGS="$save_CFLAGS"
6826 CC="$ac_save_cc"
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6828$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6829
6830 if test $ac_cv_declaration_after_statement_warning = yes
6831 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006832 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006833 fi
6834
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6836$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6837 ac_save_cc="$CC"
6838 CC="$CC -Wsign-compare"
6839 save_CFLAGS="$CFLAGS"
6840 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6841 $as_echo_n "(cached) " >&6
6842else
6843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6844/* end confdefs.h. */
6845
6846
6847int
6848main ()
6849{
6850
6851 ;
6852 return 0;
6853}
6854
6855_ACEOF
6856if ac_fn_c_try_compile "$LINENO"; then :
6857
6858 ac_cv_enable_sign_compare_warning=yes
6859
6860else
6861
6862 ac_cv_enable_sign_compare_warning=no
6863
6864fi
6865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6866fi
6867
6868 CFLAGS="$save_CFLAGS"
6869 CC="$ac_save_cc"
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6871$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6872
6873 if test $ac_cv_enable_sign_compare_warning = yes
6874 then
6875 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6876 fi
6877
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6879$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6880 ac_save_cc="$CC"
6881 CC="$CC -Wunreachable-code"
6882 save_CFLAGS="$CFLAGS"
6883 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6884 $as_echo_n "(cached) " >&6
6885else
6886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6887/* end confdefs.h. */
6888
6889
6890int
6891main ()
6892{
6893
6894 ;
6895 return 0;
6896}
6897
6898_ACEOF
6899if ac_fn_c_try_compile "$LINENO"; then :
6900
6901 ac_cv_enable_unreachable_code_warning=yes
6902
6903else
6904
6905 ac_cv_enable_unreachable_code_warning=no
6906
6907fi
6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6909fi
6910
6911 CFLAGS="$save_CFLAGS"
6912 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006913
6914 # Don't enable unreachable code warning in debug mode, since it usually
6915 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006916 # Issue #24324: Unfortunately, the unreachable code warning does not work
6917 # correctly on gcc and has been silently removed from the compiler.
6918 # It is supported on clang but on OS X systems gcc may be an alias
6919 # for clang. Try to determine if the compiler is not really gcc and,
6920 # if so, only then enable the warning.
6921 if test $ac_cv_enable_unreachable_code_warning = yes && \
6922 test "$Py_DEBUG" != "true" && \
6923 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006924 then
6925 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006926 else
6927 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006928 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6930$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6933 # support. Without this, treatment of subnormals doesn't follow
6934 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006935 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936 alpha*)
6937 BASECFLAGS="$BASECFLAGS -mieee"
6938 ;;
6939 esac
6940
6941 case $ac_sys_system in
6942 SCO_SV*)
6943 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6944 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006945
6946 # is there any other compiler on Darwin besides gcc?
6947 Darwin*)
6948 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6949 # used to be here, but non-Apple gcc doesn't accept them.
6950 if test "${CC}" = gcc
6951 then
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006953$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006954 case "${UNIVERSALSDK}" in
6955 */MacOSX10.4u.sdk)
6956 # Build using 10.4 SDK, force usage of gcc when the
6957 # compiler is gcc, otherwise the user will get very
6958 # confusing error messages when building on OSX 10.6
6959 CC=gcc-4.0
6960 CPP=cpp-4.0
6961 ;;
6962 esac
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006964$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006965 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966
Ned Deily87adb6e2013-10-18 21:09:56 -07006967 if test "${enable_universalsdk}"
6968 then
6969 case "$UNIVERSAL_ARCHS" in
6970 32-bit)
6971 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6972 LIPO_32BIT_FLAGS=""
6973 ARCH_RUN_32BIT=""
6974 ;;
6975 64-bit)
6976 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6977 LIPO_32BIT_FLAGS=""
6978 ARCH_RUN_32BIT="true"
6979 ;;
6980 all)
6981 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6982 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6983 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6984 ;;
6985 intel)
6986 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6987 LIPO_32BIT_FLAGS="-extract i386"
6988 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6989 ;;
6990 intel-32)
6991 UNIVERSAL_ARCH_FLAGS="-arch i386"
6992 LIPO_32BIT_FLAGS=""
6993 ARCH_RUN_32BIT=""
6994 ;;
6995 3-way)
6996 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6997 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6998 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6999 ;;
7000 *)
7001 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7002 ;;
7003 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004
Ned Deily87adb6e2013-10-18 21:09:56 -07007005 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7006 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7007 if test "${UNIVERSALSDK}" != "/"
7008 then
7009 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7010 fi
7011 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012
Ned Deily87adb6e2013-10-18 21:09:56 -07007013 # Calculate an appropriate deployment target for this build:
7014 # The deployment target value is used explicitly to enable certain
7015 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007016 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007017 # component of the string returned by distutils.get_platform().
7018 #
7019 # Use the value from:
7020 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7021 # 2. the operating system version of the build machine if >= 10.6
7022 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7023 # below to pick either 10.3, 10.4, or 10.5 as the target.
7024 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007025
Ned Deily87adb6e2013-10-18 21:09:56 -07007026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7027$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007028 cur_target_major=`sw_vers -productVersion | \
7029 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7030 cur_target_minor=`sw_vers -productVersion | \
7031 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7032 cur_target="${cur_target_major}.${cur_target_minor}"
7033 if test ${cur_target_major} -eq 10 && \
7034 test ${cur_target_minor} -ge 3 && \
7035 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007036 then
Ned Deily36820b62014-06-25 13:44:22 -07007037 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007038 cur_target=10.3
7039 if test ${enable_universalsdk}
7040 then
7041 case "$UNIVERSAL_ARCHS" in
7042 all|3-way|intel|64-bit)
7043 # These configurations were first supported in 10.5
7044 cur_target='10.5'
7045 ;;
7046 esac
7047 else
7048 if test `/usr/bin/arch` = "i386"
7049 then
7050 # 10.4 was the first release to support Intel archs
7051 cur_target="10.4"
7052 fi
7053 fi
7054 fi
7055 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007056
Ned Deily87adb6e2013-10-18 21:09:56 -07007057 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7058 # environment with a value that is the same as what we'll use
7059 # in the Makefile to ensure that we'll get the same compiler
7060 # environment during configure and build time.
7061 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7062 export MACOSX_DEPLOYMENT_TARGET
7063 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7065$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007066
Ned Deily87adb6e2013-10-18 21:09:56 -07007067 # end of Darwin* tests
7068 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007069 esac
7070 ;;
7071
7072*)
7073 case $ac_sys_system in
7074 OpenUNIX*|UnixWare*)
7075 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7076 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007077 SCO_SV*)
7078 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7079 ;;
7080 esac
7081 ;;
7082esac
7083
Zachary Ware5af85642015-12-21 12:09:17 -06007084# ICC needs -fp-model strict or floats behave badly
7085case "$CC" in
7086*icc*)
7087 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7088 ;;
7089esac
7090
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007091if test "$Py_DEBUG" = 'true'; then
7092 :
7093else
7094 OPT="-DNDEBUG $OPT"
7095fi
7096
7097if test "$ac_arch_flags"
7098then
7099 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7100fi
7101
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007102# On some compilers, pthreads are available without further options
7103# (e.g. MacOS X). On some of these systems, the compiler will not
7104# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7105# So we have to see first whether pthreads are available without
7106# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7108$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007109if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111else
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007113 ac_cv_pthread_is_default=no
7114else
Matthias Kloseb9621712010-04-24 17:59:49 +00007115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007116/* end confdefs.h. */
7117
Stefan Krah7dba5942012-11-22 22:49:11 +01007118#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007119#include <pthread.h>
7120
7121void* routine(void* p){return NULL;}
7122
7123int main(){
7124 pthread_t p;
7125 if(pthread_create(&p,NULL,routine,NULL)!=0)
7126 return 1;
7127 (void)pthread_detach(p);
7128 return 0;
7129}
7130
7131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007132if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133
7134 ac_cv_pthread_is_default=yes
7135 ac_cv_kthread=no
7136 ac_cv_pthread=no
7137
7138else
Matthias Kloseb9621712010-04-24 17:59:49 +00007139 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007143fi
7144
7145
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007146fi
7147
Matthias Kloseb9621712010-04-24 17:59:49 +00007148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7149$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007150
7151
7152if test $ac_cv_pthread_is_default = yes
7153then
7154 ac_cv_kpthread=no
7155else
7156# -Kpthread, if available, provides the right #defines
7157# and linker options to make pthread_create available
7158# Some compilers won't report that they do not support -Kpthread,
7159# so we need to run a program to see whether it really made the
7160# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7162$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007163if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007165else
7166 ac_save_cc="$CC"
7167CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007168if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007169 ac_cv_kpthread=no
7170else
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007172/* end confdefs.h. */
7173
Stefan Krah7dba5942012-11-22 22:49:11 +01007174#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007175#include <pthread.h>
7176
7177void* routine(void* p){return NULL;}
7178
7179int main(){
7180 pthread_t p;
7181 if(pthread_create(&p,NULL,routine,NULL)!=0)
7182 return 1;
7183 (void)pthread_detach(p);
7184 return 0;
7185}
7186
7187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007188if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007189 ac_cv_kpthread=yes
7190else
Matthias Kloseb9621712010-04-24 17:59:49 +00007191 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007195fi
7196
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007197CC="$ac_save_cc"
7198fi
7199
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7201$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007202fi
7203
7204if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7205then
7206# -Kthread, if available, provides the right #defines
7207# and linker options to make pthread_create available
7208# Some compilers won't report that they do not support -Kthread,
7209# so we need to run a program to see whether it really made the
7210# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7212$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007213if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215else
7216 ac_save_cc="$CC"
7217CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007218if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007219 ac_cv_kthread=no
7220else
Matthias Kloseb9621712010-04-24 17:59:49 +00007221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007222/* end confdefs.h. */
7223
Stefan Krah7dba5942012-11-22 22:49:11 +01007224#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007225#include <pthread.h>
7226
7227void* routine(void* p){return NULL;}
7228
7229int main(){
7230 pthread_t p;
7231 if(pthread_create(&p,NULL,routine,NULL)!=0)
7232 return 1;
7233 (void)pthread_detach(p);
7234 return 0;
7235}
7236
7237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007238if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239 ac_cv_kthread=yes
7240else
Matthias Kloseb9621712010-04-24 17:59:49 +00007241 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7244 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245fi
7246
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247CC="$ac_save_cc"
7248fi
7249
Matthias Kloseb9621712010-04-24 17:59:49 +00007250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7251$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007252fi
7253
7254if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7255then
7256# -pthread, if available, provides the right #defines
7257# and linker options to make pthread_create available
7258# Some compilers won't report that they do not support -pthread,
7259# so we need to run a program to see whether it really made the
7260# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7262$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007263if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265else
7266 ac_save_cc="$CC"
7267CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007268if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269 ac_cv_pthread=no
7270else
Matthias Kloseb9621712010-04-24 17:59:49 +00007271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007272/* end confdefs.h. */
7273
Stefan Krah7dba5942012-11-22 22:49:11 +01007274#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007275#include <pthread.h>
7276
7277void* routine(void* p){return NULL;}
7278
7279int main(){
7280 pthread_t p;
7281 if(pthread_create(&p,NULL,routine,NULL)!=0)
7282 return 1;
7283 (void)pthread_detach(p);
7284 return 0;
7285}
7286
7287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007288if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007289 ac_cv_pthread=yes
7290else
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295fi
7296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007297CC="$ac_save_cc"
7298fi
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7301$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302fi
7303
7304# If we have set a CC compiler flag for thread support then
7305# check if it works for CXX, too.
7306ac_cv_cxx_thread=no
7307if test ! -z "$CXX"
7308then
Matthias Kloseb9621712010-04-24 17:59:49 +00007309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7310$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007311ac_save_cxx="$CXX"
7312
7313if test "$ac_cv_kpthread" = "yes"
7314then
7315 CXX="$CXX -Kpthread"
7316 ac_cv_cxx_thread=yes
7317elif test "$ac_cv_kthread" = "yes"
7318then
7319 CXX="$CXX -Kthread"
7320 ac_cv_cxx_thread=yes
7321elif test "$ac_cv_pthread" = "yes"
7322then
7323 CXX="$CXX -pthread"
7324 ac_cv_cxx_thread=yes
7325fi
7326
7327if test $ac_cv_cxx_thread = yes
7328then
7329 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7330 $CXX -c conftest.$ac_ext 2>&5
7331 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7332 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7333 then
7334 ac_cv_cxx_thread=yes
7335 else
7336 ac_cv_cxx_thread=no
7337 fi
7338 rm -fr conftest*
7339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7341$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342fi
7343CXX="$ac_save_cxx"
7344
7345
7346# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7348$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007349if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007350 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351else
Matthias Kloseb9621712010-04-24 17:59:49 +00007352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353/* end confdefs.h. */
7354#include <stdlib.h>
7355#include <stdarg.h>
7356#include <string.h>
7357#include <float.h>
7358
7359int
7360main ()
7361{
7362
7363 ;
7364 return 0;
7365}
7366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007367if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368 ac_cv_header_stdc=yes
7369else
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007371fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7373
7374if test $ac_cv_header_stdc = yes; then
7375 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377/* end confdefs.h. */
7378#include <string.h>
7379
7380_ACEOF
7381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007382 $EGREP "memchr" >/dev/null 2>&1; then :
7383
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384else
7385 ac_cv_header_stdc=no
7386fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007387rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388
7389fi
7390
7391if test $ac_cv_header_stdc = yes; then
7392 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394/* end confdefs.h. */
7395#include <stdlib.h>
7396
7397_ACEOF
7398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007399 $EGREP "free" >/dev/null 2>&1; then :
7400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401else
7402 ac_cv_header_stdc=no
7403fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007404rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405
7406fi
7407
7408if test $ac_cv_header_stdc = yes; then
7409 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007410 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 :
7412else
Matthias Kloseb9621712010-04-24 17:59:49 +00007413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007414/* end confdefs.h. */
7415#include <ctype.h>
7416#include <stdlib.h>
7417#if ((' ' & 0x0FF) == 0x020)
7418# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7419# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7420#else
7421# define ISLOWER(c) \
7422 (('a' <= (c) && (c) <= 'i') \
7423 || ('j' <= (c) && (c) <= 'r') \
7424 || ('s' <= (c) && (c) <= 'z'))
7425# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7426#endif
7427
7428#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7429int
7430main ()
7431{
7432 int i;
7433 for (i = 0; i < 256; i++)
7434 if (XOR (islower (i), ISLOWER (i))
7435 || toupper (i) != TOUPPER (i))
7436 return 2;
7437 return 0;
7438}
7439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007440if ac_fn_c_try_run "$LINENO"; then :
7441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442else
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7446 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447fi
7448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449fi
7450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7452$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453if test $ac_cv_header_stdc = yes; then
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456
7457fi
7458
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007459for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007460fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007461ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007462sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007463unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007464poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007465sys/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 +01007466sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007467sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007468sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007469sys/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 -07007470libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007471bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007472sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007473do :
7474 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7475ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007476if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007477 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007478#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007479_ACEOF
7480
7481fi
7482
Guido van Rossum627b2d71993-12-24 10:39:16 +00007483done
7484
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007485ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007486for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007487 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7489$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007490if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007494/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007495#include <sys/types.h>
7496#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007497
Martin v. Löwis11437992002-04-12 09:54:03 +00007498int
7499main ()
7500{
7501if ((DIR *) 0)
7502return 0;
7503 ;
7504 return 0;
7505}
7506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007508 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007509else
Matthias Kloseb9621712010-04-24 17:59:49 +00007510 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007514eval ac_res=\$$as_ac_Header
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7516$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007517if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007519#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007520_ACEOF
7521
7522ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007523fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007525done
7526# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7527if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7529$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007530if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007532else
Martin v. Löwis11437992002-04-12 09:54:03 +00007533 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007537/* Override any GCC internal prototype to avoid an error.
7538 Use char because int might match the return type of a GCC
7539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007540#ifdef __cplusplus
7541extern "C"
7542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007543char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007544int
7545main ()
7546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007547return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 ;
7549 return 0;
7550}
7551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007552for ac_lib in '' dir; do
7553 if test -z "$ac_lib"; then
7554 ac_res="none required"
7555 else
7556 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007557 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007558 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007559 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562rm -f core conftest.err conftest.$ac_objext \
7563 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007564 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007565 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007567done
Victor Stinnere0be4232011-10-25 13:06:09 +02007568if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007570else
7571 ac_cv_search_opendir=no
7572fi
7573rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007574LIBS=$ac_func_search_save_LIBS
7575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7577$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007578ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007579if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007581
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007582fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007583
Michael W. Hudson54241132001-12-07 15:38:26 +00007584else
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7586$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007587if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007588 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
7590 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007594/* Override any GCC internal prototype to avoid an error.
7595 Use char because int might match the return type of a GCC
7596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007597#ifdef __cplusplus
7598extern "C"
7599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007600char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007601int
7602main ()
7603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007605 ;
7606 return 0;
7607}
7608_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609for ac_lib in '' x; do
7610 if test -z "$ac_lib"; then
7611 ac_res="none required"
7612 else
7613 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007614 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007619rm -f core conftest.err conftest.$ac_objext \
7620 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007621 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007622 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007624done
Victor Stinnere0be4232011-10-25 13:06:09 +02007625if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627else
7628 ac_cv_search_opendir=no
7629fi
7630rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007631LIBS=$ac_func_search_save_LIBS
7632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7634$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007636if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007638
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007639fi
7640
7641fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7644$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007645if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007647else
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007649/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007650#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007651int
7652main ()
7653{
7654return makedev(0, 0);
7655 ;
7656 return 0;
7657}
7658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007660 ac_cv_header_sys_types_h_makedev=yes
7661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007664rm -f core conftest.err conftest.$ac_objext \
7665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007666
7667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7669$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007670
7671if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007672ac_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 +02007673if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007674
Matthias Kloseb9621712010-04-24 17:59:49 +00007675$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007676
7677fi
7678
7679
7680
7681 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 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 +02007683if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007684
Matthias Kloseb9621712010-04-24 17:59:49 +00007685$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007686
7687fi
7688
7689
7690 fi
7691fi
7692
Michael W. Hudson54241132001-12-07 15:38:26 +00007693
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007694# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7695for ac_header in net/if.h
7696do :
7697 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7698#ifdef STDC_HEADERS
7699# include <stdlib.h>
7700# include <stddef.h>
7701#else
7702# ifdef HAVE_STDLIB_H
7703# include <stdlib.h>
7704# endif
7705#endif
7706#ifdef HAVE_SYS_SOCKET_H
7707# include <sys/socket.h>
7708#endif
7709
7710"
Victor Stinnere0be4232011-10-25 13:06:09 +02007711if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007712 cat >>confdefs.h <<_ACEOF
7713#define HAVE_NET_IF_H 1
7714_ACEOF
7715
7716fi
7717
7718done
7719
7720
Martin v. Löwis11017b12006-01-14 18:12:57 +00007721# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007722for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007723do :
7724 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 +00007725#ifdef HAVE_ASM_TYPES_H
7726#include <asm/types.h>
7727#endif
7728#ifdef HAVE_SYS_SOCKET_H
7729#include <sys/socket.h>
7730#endif
7731
Matthias Kloseb9621712010-04-24 17:59:49 +00007732"
Victor Stinnere0be4232011-10-25 13:06:09 +02007733if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007734 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007735#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007736_ACEOF
7737
7738fi
7739
7740done
7741
7742
Charles-François Natali47413c12011-10-06 19:47:44 +02007743# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007744for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007745do :
7746 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7747ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7748#ifdef HAVE_SYS_SOCKET_H
7749#include <sys/socket.h>
7750#endif
7751
7752"
7753if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7754 cat >>confdefs.h <<_ACEOF
7755#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7756_ACEOF
7757
7758fi
7759
7760done
7761
7762
Guido van Rossum627b2d71993-12-24 10:39:16 +00007763# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007764was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7766$as_echo_n "checking for clock_t in time.h... " >&6; }
7767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007768/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007769#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007770
7771_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007774 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007775else
Martin v. Löwis11437992002-04-12 09:54:03 +00007776
7777
Matthias Kloseb9621712010-04-24 17:59:49 +00007778$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007779
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007780
Guido van Rossum627b2d71993-12-24 10:39:16 +00007781fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007782rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7785$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007786
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7788$as_echo_n "checking for makedev... " >&6; }
7789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007791
Jesus Cea740f53a2010-04-28 11:35:30 +00007792#if defined(MAJOR_IN_MKDEV)
7793#include <sys/mkdev.h>
7794#elif defined(MAJOR_IN_SYSMACROS)
7795#include <sys/sysmacros.h>
7796#else
7797#include <sys/types.h>
7798#endif
7799
Neal Norwitz11690112002-07-30 01:08:28 +00007800int
7801main ()
7802{
Jesus Cea740f53a2010-04-28 11:35:30 +00007803
7804 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007805 ;
7806 return 0;
7807}
Matthias Kloseb159a552010-04-25 21:00:44 +00007808
Neal Norwitz11690112002-07-30 01:08:28 +00007809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007810if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007811 ac_cv_has_makedev=yes
7812else
Matthias Kloseb9621712010-04-24 17:59:49 +00007813 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815rm -f core conftest.err conftest.$ac_objext \
7816 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7818$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007819if test "$ac_cv_has_makedev" = "yes"; then
7820
Matthias Kloseb9621712010-04-24 17:59:49 +00007821$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007822
7823fi
7824
Christian Heimes985ecdc2013-11-20 11:46:18 +01007825# byte swapping
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7827$as_echo_n "checking for le64toh... " >&6; }
7828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7829/* end confdefs.h. */
7830
7831#ifdef HAVE_ENDIAN_H
7832#include <endian.h>
7833#elif defined(HAVE_SYS_ENDIAN_H)
7834#include <sys/endian.h>
7835#endif
7836
7837int
7838main ()
7839{
7840
7841 le64toh(1)
7842 ;
7843 return 0;
7844}
7845
7846_ACEOF
7847if ac_fn_c_try_link "$LINENO"; then :
7848 ac_cv_has_le64toh=yes
7849else
7850 ac_cv_has_le64toh=no
7851fi
7852rm -f core conftest.err conftest.$ac_objext \
7853 conftest$ac_exeext conftest.$ac_ext
7854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7855$as_echo "$ac_cv_has_le64toh" >&6; }
7856if test "$ac_cv_has_le64toh" = "yes"; then
7857
7858$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7859
7860fi
7861
Martin v. Löwis399a6892002-10-04 10:22:02 +00007862# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7863# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7864# defined, but the compiler does not support pragma redefine_extname,
7865# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7866# structures (such as rlimit64) without declaring them. As a
7867# work-around, disable LFS on such configurations
7868
7869use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7871$as_echo_n "checking Solaris LFS bug... " >&6; }
7872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007873/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007874
7875#define _LARGEFILE_SOURCE 1
7876#define _FILE_OFFSET_BITS 64
7877#include <sys/resource.h>
7878
Martin v. Löwis399a6892002-10-04 10:22:02 +00007879int
7880main ()
7881{
7882struct rlimit foo;
7883 ;
7884 return 0;
7885}
7886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007888 sol_lfs_bug=no
7889else
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7894$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007895if test "$sol_lfs_bug" = "yes"; then
7896 use_lfs=no
7897fi
7898
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007899# Don't use largefile support for GNU/Hurd
7900case $ac_sys_system in GNU*)
7901 use_lfs=no
7902esac
7903
Martin v. Löwis399a6892002-10-04 10:22:02 +00007904if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007905# Two defines needed to enable largefile support on various platforms
7906# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007907case $ac_sys_system/$ac_sys_release in
7908AIX*)
7909
7910$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7911
7912 ;;
7913esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007914
Matthias Kloseb9621712010-04-24 17:59:49 +00007915$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007916
7917
Matthias Kloseb9621712010-04-24 17:59:49 +00007918$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007919
Martin v. Löwis399a6892002-10-04 10:22:02 +00007920fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007921
Guido van Rossum84e7b241996-08-19 21:59:00 +00007922# Add some code to confdefs.h so that the test for off_t works on SCO
7923cat >> confdefs.h <<\EOF
7924#if defined(SCO_DS)
7925#undef _OFF_T
7926#endif
7927EOF
7928
Guido van Rossumef2255b2000-03-10 22:30:29 +00007929# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007930ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007931if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007932
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007933else
Martin v. Löwis11437992002-04-12 09:54:03 +00007934
7935cat >>confdefs.h <<_ACEOF
7936#define mode_t int
7937_ACEOF
7938
7939fi
7940
Matthias Kloseb9621712010-04-24 17:59:49 +00007941ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007942if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007944else
Martin v. Löwis11437992002-04-12 09:54:03 +00007945
7946cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007948_ACEOF
7949
7950fi
7951
Matthias Kloseb9621712010-04-24 17:59:49 +00007952ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007953if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007955else
Martin v. Löwis11437992002-04-12 09:54:03 +00007956
7957cat >>confdefs.h <<_ACEOF
7958#define pid_t int
7959_ACEOF
7960
7961fi
7962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007963
Martin v. Löwis11437992002-04-12 09:54:03 +00007964cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007965#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007966_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007967
Matthias Kloseb9621712010-04-24 17:59:49 +00007968ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007969if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007970
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007971else
Martin v. Löwis11437992002-04-12 09:54:03 +00007972
7973cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007975_ACEOF
7976
7977fi
7978
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7980$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007981if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007983else
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007985/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007986#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007987
7988_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007990 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007991 ac_cv_type_uid_t=yes
7992else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007993 ac_cv_type_uid_t=no
7994fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007995rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7999$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008000if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001
Matthias Kloseb9621712010-04-24 17:59:49 +00008002$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008003
8004
Matthias Kloseb9621712010-04-24 17:59:49 +00008005$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008006
8007fi
8008
Mark Dickinson983bc162012-12-02 12:11:38 +00008009
Matthias Kloseb9621712010-04-24 17:59:49 +00008010ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008011if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012
Matthias Kloseb9621712010-04-24 17:59:49 +00008013$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008014
8015fi
8016
Stefan Krah1919b7e2012-03-21 18:25:23 +01008017ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8018if test "x$ac_cv_type___uint128_t" = xyes; then :
8019
8020$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8021
8022fi
8023
Jack Jansendd19cf82001-12-06 22:36:17 +00008024
Michael W. Hudson54241132001-12-07 15:38:26 +00008025# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008026# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027# The cast to long int works around a bug in the HP C Compiler
8028# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8029# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8030# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8032$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008033if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008035else
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 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 +00008037
Martin v. Löwis11437992002-04-12 09:54:03 +00008038else
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 if test "$ac_cv_type_int" = yes; then
8040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008042as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008043See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 else
8045 ac_cv_sizeof_int=0
8046 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048
Martin v. Löwis11437992002-04-12 09:54:03 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8051$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052
8053
8054
Martin v. Löwis11437992002-04-12 09:54:03 +00008055cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008056#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008057_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008058
8059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060# The cast to long int works around a bug in the HP C Compiler
8061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8063# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8065$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 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 +00008070
Martin v. Löwis11437992002-04-12 09:54:03 +00008071else
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 if test "$ac_cv_type_long" = yes; then
8073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008075as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008076See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077 else
8078 ac_cv_sizeof_long=0
8079 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008081
Martin v. Löwis11437992002-04-12 09:54:03 +00008082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8084$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085
8086
8087
Martin v. Löwis11437992002-04-12 09:54:03 +00008088cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008089#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008090_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008091
8092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093# The cast to long int works around a bug in the HP C Compiler
8094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8096# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8098$as_echo_n "checking size of long long... " >&6; }
8099if ${ac_cv_sizeof_long_long+:} false; then :
8100 $as_echo_n "(cached) " >&6
8101else
8102 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8103
8104else
8105 if test "$ac_cv_type_long_long" = yes; then
8106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8108as_fn_error 77 "cannot compute sizeof (long long)
8109See \`config.log' for more details" "$LINENO" 5; }
8110 else
8111 ac_cv_sizeof_long_long=0
8112 fi
8113fi
8114
8115fi
8116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8117$as_echo "$ac_cv_sizeof_long_long" >&6; }
8118
8119
8120
8121cat >>confdefs.h <<_ACEOF
8122#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8123_ACEOF
8124
8125
8126# The cast to long int works around a bug in the HP C Compiler
8127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8129# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8131$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008132if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008134else
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 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 +00008136
Martin v. Löwis11437992002-04-12 09:54:03 +00008137else
Matthias Kloseb9621712010-04-24 17:59:49 +00008138 if test "$ac_cv_type_void_p" = yes; then
8139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008141as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008142See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008143 else
8144 ac_cv_sizeof_void_p=0
8145 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008147
Martin v. Löwis11437992002-04-12 09:54:03 +00008148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8150$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151
8152
8153
Martin v. Löwis11437992002-04-12 09:54:03 +00008154cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008155#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008156_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008157
8158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159# The cast to long int works around a bug in the HP C Compiler
8160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8162# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8164$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008167else
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 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 +00008169
Martin v. Löwis11437992002-04-12 09:54:03 +00008170else
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 if test "$ac_cv_type_short" = yes; then
8172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008174as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008175See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176 else
8177 ac_cv_sizeof_short=0
8178 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008180
Martin v. Löwis11437992002-04-12 09:54:03 +00008181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8183$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008184
8185
8186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008188#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008190
8191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192# The cast to long int works around a bug in the HP C Compiler
8193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8195# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8197$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008198if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008199 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008200else
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 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 +00008202
Martin v. Löwis11437992002-04-12 09:54:03 +00008203else
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 if test "$ac_cv_type_float" = yes; then
8205 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008207as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008208See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 else
8210 ac_cv_sizeof_float=0
8211 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008213
Martin v. Löwis11437992002-04-12 09:54:03 +00008214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8216$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217
8218
8219
Martin v. Löwis11437992002-04-12 09:54:03 +00008220cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008221#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008222_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008223
8224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225# The cast to long int works around a bug in the HP C Compiler
8226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8230$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008231if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 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 +00008235
Martin v. Löwis11437992002-04-12 09:54:03 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 if test "$ac_cv_type_double" = yes; then
8238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008240as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008241See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 else
8243 ac_cv_sizeof_double=0
8244 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8249$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250
8251
8252
Martin v. Löwis11437992002-04-12 09:54:03 +00008253cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008254#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008255_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008256
8257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258# The cast to long int works around a bug in the HP C Compiler
8259# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8260# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8261# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8263$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008264if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008265 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008266else
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 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 +00008268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269else
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 if test "$ac_cv_type_fpos_t" = yes; then
8271 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008273as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008274See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275 else
8276 ac_cv_sizeof_fpos_t=0
8277 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8282$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283
8284
8285
Martin v. Löwis11437992002-04-12 09:54:03 +00008286cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008287#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008288_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008289
Michael W. Hudson54241132001-12-07 15:38:26 +00008290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291# The cast to long int works around a bug in the HP C Compiler
8292# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8293# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8294# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8296$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008297if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008299else
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 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 +00008301
Martin v. Löwis18e16552006-02-15 17:27:45 +00008302else
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 if test "$ac_cv_type_size_t" = yes; then
8304 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008306as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008307See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308 else
8309 ac_cv_sizeof_size_t=0
8310 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008312
Martin v. Löwis18e16552006-02-15 17:27:45 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8315$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316
8317
8318
Martin v. Löwis18e16552006-02-15 17:27:45 +00008319cat >>confdefs.h <<_ACEOF
8320#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8321_ACEOF
8322
8323
Christian Heimes400adb02008-02-01 08:12:03 +00008324# The cast to long int works around a bug in the HP C Compiler
8325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8327# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8329$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008330if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008332else
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 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 +00008334
Christian Heimes400adb02008-02-01 08:12:03 +00008335else
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 if test "$ac_cv_type_pid_t" = yes; then
8337 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008339as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008340See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008341 else
8342 ac_cv_sizeof_pid_t=0
8343 fi
8344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008345
Christian Heimes400adb02008-02-01 08:12:03 +00008346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8348$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008349
8350
8351
8352cat >>confdefs.h <<_ACEOF
8353#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8354_ACEOF
8355
8356
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008357# The cast to long int works around a bug in the HP C Compiler
8358# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8359# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8360# This bug is HP SR number 8606223364.
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8362$as_echo_n "checking size of uintptr_t... " >&6; }
8363if ${ac_cv_sizeof_uintptr_t+:} false; then :
8364 $as_echo_n "(cached) " >&6
8365else
8366 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8367
8368else
8369 if test "$ac_cv_type_uintptr_t" = yes; then
8370 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8371$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8372as_fn_error 77 "cannot compute sizeof (uintptr_t)
8373See \`config.log' for more details" "$LINENO" 5; }
8374 else
8375 ac_cv_sizeof_uintptr_t=0
8376 fi
8377fi
8378
8379fi
8380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8381$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8382
8383
8384
8385cat >>confdefs.h <<_ACEOF
8386#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8387_ACEOF
8388
8389
Michael W. Hudson54241132001-12-07 15:38:26 +00008390
Matthias Kloseb9621712010-04-24 17:59:49 +00008391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8392$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008393have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008395/* end confdefs.h. */
8396
8397int
8398main ()
8399{
8400long double x; x = (long double)0;
8401 ;
8402 return 0;
8403}
8404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008405if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008406
8407
Matthias Kloseb9621712010-04-24 17:59:49 +00008408$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008409
8410 have_long_double=yes
8411
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008412fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8415$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008416if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008417# The cast to long int works around a bug in the HP C Compiler
8418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8420# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8422$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008423if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 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 +00008427
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008428else
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 if test "$ac_cv_type_long_double" = yes; then
8430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008432as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008433See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008434 else
8435 ac_cv_sizeof_long_double=0
8436 fi
8437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008438
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8441$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008442
8443
8444
8445cat >>confdefs.h <<_ACEOF
8446#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8447_ACEOF
8448
8449
8450fi
8451
8452
Matthias Kloseb9621712010-04-24 17:59:49 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8454$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008455have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008457/* end confdefs.h. */
8458
8459int
8460main ()
8461{
8462_Bool x; x = (_Bool)0;
8463 ;
8464 return 0;
8465}
8466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008467if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008468
8469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008471
8472 have_c99_bool=yes
8473
Thomas Woutersb2137042007-02-01 18:02:27 +00008474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8477$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008478if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479# The cast to long int works around a bug in the HP C Compiler
8480# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8481# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8482# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8484$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008485if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 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 +00008489
Thomas Woutersb2137042007-02-01 18:02:27 +00008490else
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 if test "$ac_cv_type__Bool" = yes; then
8492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008494as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008495See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496 else
8497 ac_cv_sizeof__Bool=0
8498 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500
Thomas Woutersb2137042007-02-01 18:02:27 +00008501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8503$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504
8505
8506
Thomas Woutersb2137042007-02-01 18:02:27 +00008507cat >>confdefs.h <<_ACEOF
8508#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8509_ACEOF
8510
8511
8512fi
8513
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008514# The cast to long int works around a bug in the HP C Compiler
8515# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8516# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8517# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8519$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008520if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008524#ifdef HAVE_SYS_TYPES_H
8525#include <sys/types.h>
8526#endif
8527
Matthias Kloseb9621712010-04-24 17:59:49 +00008528"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008529
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 if test "$ac_cv_type_off_t" = yes; then
8532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008534as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008535See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008536 else
8537 ac_cv_sizeof_off_t=0
8538 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008540
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8543$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008544
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008545
8546
Martin v. Löwis11437992002-04-12 09:54:03 +00008547cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008548#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008549_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008550
Michael W. Hudson54241132001-12-07 15:38:26 +00008551
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8554$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008555if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008556 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008557
Matthias Kloseb9621712010-04-24 17:59:49 +00008558$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008559
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8561$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008562else
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8564$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008565fi
8566
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008567# The cast to long int works around a bug in the HP C Compiler
8568# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8569# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8570# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8572$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008573if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008575else
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008577#ifdef HAVE_SYS_TYPES_H
8578#include <sys/types.h>
8579#endif
8580#ifdef HAVE_TIME_H
8581#include <time.h>
8582#endif
8583
Matthias Kloseb9621712010-04-24 17:59:49 +00008584"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008585
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008586else
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 if test "$ac_cv_type_time_t" = yes; then
8588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008590as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008591See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008592 else
8593 ac_cv_sizeof_time_t=0
8594 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8599$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008600
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008601
8602
Martin v. Löwis11437992002-04-12 09:54:03 +00008603cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008604#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008605_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008606
Michael W. Hudson54241132001-12-07 15:38:26 +00008607
8608
Trent Mick635f6fb2000-08-23 21:33:05 +00008609# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008610ac_save_cc="$CC"
8611if test "$ac_cv_kpthread" = "yes"
8612then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008613elif test "$ac_cv_kthread" = "yes"
8614then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008615elif test "$ac_cv_pthread" = "yes"
8616then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008617fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008618
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8620$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008621have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008623/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008624
8625 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008626int
8627main ()
8628{
Guido van Rossum12580492000-09-24 16:47:19 +00008629pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ;
8631 return 0;
8632}
Matthias Kloseb159a552010-04-25 21:00:44 +00008633
Martin v. Löwis11437992002-04-12 09:54:03 +00008634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008635if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008636 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8640$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008641if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8645# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8647$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008650else
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008652#ifdef HAVE_PTHREAD_H
8653#include <pthread.h>
8654#endif
8655
Matthias Kloseb9621712010-04-24 17:59:49 +00008656"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008657
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008658else
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 if test "$ac_cv_type_pthread_t" = yes; then
8660 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008662as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008663See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008664 else
8665 ac_cv_sizeof_pthread_t=0
8666 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668
Trent Mick635f6fb2000-08-23 21:33:05 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8671$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008672
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008673
8674
Martin v. Löwis11437992002-04-12 09:54:03 +00008675cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008676#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008677_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008678
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008679
Trent Mick635f6fb2000-08-23 21:33:05 +00008680fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008681CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008682
Michael W. Hudson54241132001-12-07 15:38:26 +00008683
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008684case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008685 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008686 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8687 ;;
8688 Darwin/*)
8689 OTHER_LIBTOOL_OPT=""
8690 ;;
8691esac
8692
8693
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008694
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008695case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008696 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008697 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8698 if test "${enable_universalsdk}"; then
8699 :
8700 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008701 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008702 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008703 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008704 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008705 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008706 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008707 if test ${gcc_version} '<' 4.0
8708 then
8709 LIBTOOL_CRUFT="-lcc_dynamic"
8710 else
8711 LIBTOOL_CRUFT=""
8712 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008714 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008715else
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008717/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008718
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008719 #include <unistd.h>
8720 int main(int argc, char*argv[])
8721 {
8722 if (sizeof(long) == 4) {
8723 return 0;
8724 } else {
8725 return 1;
8726 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008727 }
8728
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008730if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008731 ac_osx_32bit=yes
8732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008737fi
8738
8739
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008740 if test "${ac_osx_32bit}" = "yes"; then
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="i386"
8744 ;;
8745 ppc)
8746 MACOSX_DEFAULT_ARCH="ppc"
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 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008753 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008754 i386)
8755 MACOSX_DEFAULT_ARCH="x86_64"
8756 ;;
8757 ppc)
8758 MACOSX_DEFAULT_ARCH="ppc64"
8759 ;;
8760 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008761 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008762 ;;
8763 esac
8764
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008765 fi
8766
8767 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008768 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008769 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008770esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8772$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008773if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008774then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008775 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008777 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008778
Matthias Kloseb9621712010-04-24 17:59:49 +00008779$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8782$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008783 if test $enable_shared = "yes"
8784 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008785 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 +00008786 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8789$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008790fi
8791
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8793$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008794case $ac_sys_system/$ac_sys_release in
8795 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8800$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008801 ;;
8802 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8804$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008805 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008806esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008807
Guido van Rossum0a516c91994-09-12 10:58:40 +00008808# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008809
Michael W. Hudson54241132001-12-07 15:38:26 +00008810
8811
8812
8813
Benjamin Peterson99f03762010-04-11 22:15:28 +00008814
Thomas Wouters477c8d52006-05-27 19:21:47 +00008815
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008816# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8817# -- usually .so, .sl on HP-UX, .dll on Cygwin
8818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8819$as_echo_n "checking the extension of shared libraries... " >&6; }
8820if test -z "$SHLIB_SUFFIX"; then
8821 case $ac_sys_system in
8822 hp*|HP*)
8823 case `uname -m` in
8824 ia64) SHLIB_SUFFIX=.so;;
8825 *) SHLIB_SUFFIX=.sl;;
8826 esac
8827 ;;
8828 CYGWIN*) SHLIB_SUFFIX=.dll;;
8829 *) SHLIB_SUFFIX=.so;;
8830 esac
8831fi
8832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8833$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008834
Guido van Rossum0a516c91994-09-12 10:58:40 +00008835# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008836# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008837# (Shared libraries in this instance are shared modules to be loaded into
8838# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8840$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008841if test -z "$LDSHARED"
8842then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008843 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008844 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008845 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008846 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008847 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008848 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008849 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008851 if test "$GCC" = "yes" ; then
8852 LDSHARED='$(CC) -shared'
8853 LDCXXSHARED='$(CXX) -shared'
8854 else
8855 LDSHARED='$(CC) -G'
8856 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008857 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008858 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008859 if test "$GCC" = "yes" ; then
8860 LDSHARED='$(CC) -shared'
8861 LDCXXSHARED='$(CXX) -shared'
8862 else
8863 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008864 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008865 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008866 LDSHARED='$(CC) -bundle'
8867 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008868 if test "$enable_framework" ; then
8869 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008870 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8871 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008872 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008873 else
8874 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008875 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008876 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008877 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008878 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008879 LDSHARED='$(CC) -bundle'
8880 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008881 if test "$enable_framework" ; then
8882 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008883 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8884 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008885 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008886 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008887 # No framework, use the Python app as bundle-loader
8888 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008889 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008890 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008891 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008892 Darwin/*)
8893 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8894 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008895
Ned Deily36820b62014-06-25 13:44:22 -07008896 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8897 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8898 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8899 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8900 if test ${dep_target_major} -eq 10 && \
8901 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008902 then
Ned Deily36820b62014-06-25 13:44:22 -07008903 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008904 LDSHARED='$(CC) -bundle'
8905 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008906 if test "$enable_framework" ; then
8907 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008908 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8909 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008910 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008911 else
8912 # No framework, use the Python app as bundle-loader
8913 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8914 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008915 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008916 fi
Ned Deily36820b62014-06-25 13:44:22 -07008917 else
8918 # building for OS X 10.3 and later
8919 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8920 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8921 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008922 fi
8923 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008924 Linux*|GNU*|QNX*)
8925 LDSHARED='$(CC) -shared'
8926 LDCXXSHARED='$(CXX) -shared';;
8927 BSD/OS*/4*)
8928 LDSHARED="gcc -shared"
8929 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008930 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008931 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008932 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008933 LDSHARED='$(CC) -shared'
8934 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008935 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008936 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008937 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008938 OpenBSD*)
8939 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8940 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008941 LDSHARED='$(CC) -shared $(CCSHARED)'
8942 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008943 else
8944 case `uname -r` in
8945 [01].* | 2.[0-7] | 2.[0-7].*)
8946 LDSHARED="ld -Bshareable ${LDFLAGS}"
8947 ;;
8948 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008949 LDSHARED='$(CC) -shared $(CCSHARED)'
8950 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008951 ;;
8952 esac
8953 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008954 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008955 LDSHARED='$(CC) -shared'
8956 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008957 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008958 if test "$GCC" = "yes" ; then
8959 LDSHARED='$(CC) -shared'
8960 LDCXXSHARED='$(CXX) -shared'
8961 else
8962 LDSHARED='$(CC) -G'
8963 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008964 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008965 SCO_SV*)
8966 LDSHARED='$(CC) -Wl,-G,-Bexport'
8967 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8968 CYGWIN*)
8969 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8970 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008971 *) LDSHARED="ld";;
8972 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8975$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008976LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008977BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008978# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008979# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8981$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008982if test -z "$CCSHARED"
8983then
Guido van Rossum07397971997-04-29 21:49:50 +00008984 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008985 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008986 then CCSHARED="-fPIC";
8987 elif test `uname -p` = sparc;
8988 then CCSHARED="-xcode=pic32";
8989 else CCSHARED="-Kpic";
8990 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008991 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008992 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008993 else CCSHARED="+z";
8994 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008995 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008996 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008997 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008998 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008999 if test "$GCC" = "yes"
9000 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009001 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009002 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009003 SCO_SV*)
9004 if test "$GCC" = "yes"
9005 then CCSHARED="-fPIC"
9006 else CCSHARED="-Kpic -belf"
9007 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009008 IRIX*/6*) case $CC in
9009 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009010 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009011 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009012 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9015$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009016# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009017# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9019$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009020if test -z "$LINKFORSHARED"
9021then
Guido van Rossum07397971997-04-29 21:49:50 +00009022 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009023 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009024 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009025 LINKFORSHARED="-Wl,-E -Wl,+s";;
9026# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009027 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009028 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009029 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009031 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009032
9033 # Issue #18075: the default maximum stack size (8MBytes) is too
9034 # small for the default recursion limit. Increase the stack size
9035 # to ensure that tests don't crash
9036 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9037
Jack Jansene578a632001-08-15 01:27:14 +00009038 if test "$enable_framework"
9039 then
Jack Jansenda49e192005-01-07 13:08:22 +00009040 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009041 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009042 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009043 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009044 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009045 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009046 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009047 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9048 then
9049 LINKFORSHARED="-Wl,--export-dynamic"
9050 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009051 SunOS/5*) case $CC in
9052 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009053 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009054 then
9055 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009056 fi;;
9057 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009058 CYGWIN*)
9059 if test $enable_shared = "no"
9060 then
9061 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9062 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009063 QNX*)
9064 # -Wl,-E causes the symbols to be added to the dynamic
9065 # symbol table so that they can be found when a module
9066 # is loaded. -N 2048K causes the stack size to be set
9067 # to 2048 kilobytes so that the stack doesn't overflow
9068 # when running test_compile.py.
9069 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009070 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9073$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009074
Michael W. Hudson54241132001-12-07 15:38:26 +00009075
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9078$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009079if test ! "$LIBRARY" = "$LDLIBRARY"
9080then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009081 case $ac_sys_system in
9082 CYGWIN*)
9083 # Cygwin needs CCSHARED when building extension DLLs
9084 # but not when building the interpreter DLL.
9085 CFLAGSFORSHARED='';;
9086 *)
9087 CFLAGSFORSHARED='$(CCSHARED)'
9088 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9091$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009092
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009093# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9094# library (with --enable-shared).
9095# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009096# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9097# if it is not required, since it creates a dependency of the shared library
9098# to LIBS. This, in turn, means that applications linking the shared libpython
9099# don't need to link LIBS explicitly. The default should be only changed
9100# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9103$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009104case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009105 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009106 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009107esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9109$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009110
9111
Guido van Rossum627b2d71993-12-24 10:39:16 +00009112# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9114$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009115if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009116 $as_echo_n "(cached) " >&6
9117else
9118 ac_check_lib_save_LIBS=$LIBS
9119LIBS="-lsendfile $LIBS"
9120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9121/* end confdefs.h. */
9122
9123/* Override any GCC internal prototype to avoid an error.
9124 Use char because int might match the return type of a GCC
9125 builtin and then its argument prototype would still apply. */
9126#ifdef __cplusplus
9127extern "C"
9128#endif
9129char sendfile ();
9130int
9131main ()
9132{
9133return sendfile ();
9134 ;
9135 return 0;
9136}
9137_ACEOF
9138if ac_fn_c_try_link "$LINENO"; then :
9139 ac_cv_lib_sendfile_sendfile=yes
9140else
9141 ac_cv_lib_sendfile_sendfile=no
9142fi
9143rm -f core conftest.err conftest.$ac_objext \
9144 conftest$ac_exeext conftest.$ac_ext
9145LIBS=$ac_check_lib_save_LIBS
9146fi
9147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9148$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009149if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009150 cat >>confdefs.h <<_ACEOF
9151#define HAVE_LIBSENDFILE 1
9152_ACEOF
9153
9154 LIBS="-lsendfile $LIBS"
9155
9156fi
9157
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9159$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009160if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009161 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009162else
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009164LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168/* Override any GCC internal prototype to avoid an error.
9169 Use char because int might match the return type of a GCC
9170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009171#ifdef __cplusplus
9172extern "C"
9173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009174char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009175int
9176main ()
9177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 ;
9180 return 0;
9181}
9182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009185else
Matthias Kloseb9621712010-04-24 17:59:49 +00009186 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009188rm -f core conftest.err conftest.$ac_objext \
9189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009190LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9193$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009194if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 cat >>confdefs.h <<_ACEOF
9196#define HAVE_LIBDL 1
9197_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009198
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009199 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009201fi
9202 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9204$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009205if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009207else
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009209LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213/* Override any GCC internal prototype to avoid an error.
9214 Use char because int might match the return type of a GCC
9215 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009216#ifdef __cplusplus
9217extern "C"
9218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009219char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009220int
9221main ()
9222{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009223return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ;
9225 return 0;
9226}
9227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009230else
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009233rm -f core conftest.err conftest.$ac_objext \
9234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009235LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9238$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009239if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 cat >>confdefs.h <<_ACEOF
9241#define HAVE_LIBDLD 1
9242_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009243
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009244 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009245
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009246fi
9247 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009248
Georg Brandlb1441c72009-01-03 22:33:39 +00009249# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009250if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9252$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009253if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009254 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009255else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009256 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260/* Override any GCC internal prototype to avoid an error.
9261 Use char because int might match the return type of a GCC
9262 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009263#ifdef __cplusplus
9264extern "C"
9265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009266char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009267int
9268main ()
9269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 ;
9272 return 0;
9273}
9274_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275for ac_lib in '' pthread rt posix4; do
9276 if test -z "$ac_lib"; then
9277 ac_res="none required"
9278 else
9279 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009280 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009281 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009285rm -f core conftest.err conftest.$ac_objext \
9286 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009287 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290done
Victor Stinnere0be4232011-10-25 13:06:09 +02009291if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293else
9294 ac_cv_search_sem_init=no
9295fi
9296rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009297LIBS=$ac_func_search_save_LIBS
9298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9300$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009301ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009302if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009303 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009304
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009305fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009306 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009307 # posix4 on Solaris 2.6
9308 # pthread (first!) on Linux
9309fi
9310
Martin v. Löwis19d17342003-06-14 21:03:05 +00009311# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9313$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009314if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009316else
9317 ac_check_lib_save_LIBS=$LIBS
9318LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009320/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322/* Override any GCC internal prototype to avoid an error.
9323 Use char because int might match the return type of a GCC
9324 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009325#ifdef __cplusplus
9326extern "C"
9327#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009328char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009329int
9330main ()
9331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009332return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009333 ;
9334 return 0;
9335}
9336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009337if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009338 ac_cv_lib_intl_textdomain=yes
9339else
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009342rm -f core conftest.err conftest.$ac_objext \
9343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009344LIBS=$ac_check_lib_save_LIBS
9345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9347$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009348if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009349
Matthias Kloseb9621712010-04-24 17:59:49 +00009350$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009351
Brett Cannonc6d936e2009-06-07 20:09:53 +00009352 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009353fi
9354
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009355
9356# checks for system dependent C++ extensions support
9357case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9359$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009361/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009362
Georg Brandl59e87bd2011-02-15 19:48:59 +00009363 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009364int
9365main ()
9366{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009367loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 ;
9369 return 0;
9370}
Matthias Kloseb159a552010-04-25 21:00:44 +00009371
Martin v. Löwis11437992002-04-12 09:54:03 +00009372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009373if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009374
Matthias Kloseb159a552010-04-25 21:00:44 +00009375
Matthias Kloseb9621712010-04-24 17:59:49 +00009376$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009377
Matthias Kloseb159a552010-04-25 21:00:44 +00009378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009379$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009380
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009381else
Matthias Kloseb159a552010-04-25 21:00:44 +00009382
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009384$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009385
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009387rm -f core conftest.err conftest.$ac_objext \
9388 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009389 *) ;;
9390esac
9391
Christian Heimes985ecdc2013-11-20 11:46:18 +01009392# check for systems that require aligned memory access
9393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9394$as_echo_n "checking aligned memory access is required... " >&6; }
9395if test "$cross_compiling" = yes; then :
9396 aligned_required=yes
9397else
9398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9399/* end confdefs.h. */
9400
9401int main()
9402{
9403 char s[16];
9404 int i, *p1, *p2;
9405 for (i=0; i < 16; i++)
9406 s[i] = i;
9407 p1 = (int*)(s+1);
9408 p2 = (int*)(s+2);
9409 if (*p1 == *p2)
9410 return 1;
9411 return 0;
9412}
9413
9414_ACEOF
9415if ac_fn_c_try_run "$LINENO"; then :
9416 aligned_required=no
9417else
9418 aligned_required=yes
9419fi
9420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9421 conftest.$ac_objext conftest.beam conftest.$ac_ext
9422fi
9423
9424
9425if test "$aligned_required" = yes ; then
9426
9427$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9428
9429fi
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9431$as_echo "$aligned_required" >&6; }
9432
9433
9434# str, bytes and memoryview hash algorithm
9435
9436
9437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9438$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9439
9440# Check whether --with-hash_algorithm was given.
9441if test "${with_hash_algorithm+set}" = set; then :
9442 withval=$with_hash_algorithm;
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9444$as_echo "$withval" >&6; }
9445case "$withval" in
9446 siphash24)
9447 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9448
9449 ;;
9450 fnv)
9451 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9452
9453 ;;
9454 *)
9455 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9456 ;;
9457esac
9458
9459else
9460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9461$as_echo "default" >&6; }
9462fi
9463
9464
Charles-François Natalid30b0222014-05-08 23:08:51 +01009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9466$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9467
9468# Check whether --with-address_sanitizer was given.
9469if test "${with_address_sanitizer+set}" = set; then :
9470 withval=$with_address_sanitizer;
9471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9472$as_echo "$withval" >&6; }
9473BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9474LDFLAGS="-fsanitize=address $LDFLAGS"
9475
9476else
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
9479fi
9480
9481
Guido van Rossum70c7f481998-03-26 18:44:10 +00009482# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9484$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009485if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009487else
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009489LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493/* Override any GCC internal prototype to avoid an error.
9494 Use char because int might match the return type of a GCC
9495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009496#ifdef __cplusplus
9497extern "C"
9498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009499char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009500int
9501main ()
9502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ;
9505 return 0;
9506}
9507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009510else
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009513rm -f core conftest.err conftest.$ac_objext \
9514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009515LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9518$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009519if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009520 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009521fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009522 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9524$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009525if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009527else
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009529LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533/* Override any GCC internal prototype to avoid an error.
9534 Use char because int might match the return type of a GCC
9535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009536#ifdef __cplusplus
9537extern "C"
9538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009539char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009540int
9541main ()
9542{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009544 ;
9545 return 0;
9546}
9547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009548if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009550else
Matthias Kloseb9621712010-04-24 17:59:49 +00009551 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009553rm -f core conftest.err conftest.$ac_objext \
9554 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009555LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9558$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009559if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009560 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009561fi
9562 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9565$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009568if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9571$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009572LIBS="$withval $LIBS"
9573
9574else
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9576$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577fi
9578
Guido van Rossum7f43da71994-08-01 12:15:30 +00009579
Victor Stinner8291b5e2015-03-20 16:03:14 +01009580
9581
9582
9583
9584
9585
9586
9587if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9588 if test -n "$ac_tool_prefix"; then
9589 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9590set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9592$as_echo_n "checking for $ac_word... " >&6; }
9593if ${ac_cv_path_PKG_CONFIG+:} false; then :
9594 $as_echo_n "(cached) " >&6
9595else
9596 case $PKG_CONFIG in
9597 [\\/]* | ?:[\\/]*)
9598 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9599 ;;
9600 *)
9601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9602for as_dir in $PATH
9603do
9604 IFS=$as_save_IFS
9605 test -z "$as_dir" && as_dir=.
9606 for ac_exec_ext in '' $ac_executable_extensions; do
9607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9608 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9609 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9610 break 2
9611 fi
9612done
9613 done
9614IFS=$as_save_IFS
9615
9616 ;;
9617esac
9618fi
9619PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9620if test -n "$PKG_CONFIG"; then
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9622$as_echo "$PKG_CONFIG" >&6; }
9623else
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9625$as_echo "no" >&6; }
9626fi
9627
9628
9629fi
9630if test -z "$ac_cv_path_PKG_CONFIG"; then
9631 ac_pt_PKG_CONFIG=$PKG_CONFIG
9632 # Extract the first word of "pkg-config", so it can be a program name with args.
9633set dummy pkg-config; ac_word=$2
9634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9635$as_echo_n "checking for $ac_word... " >&6; }
9636if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9637 $as_echo_n "(cached) " >&6
9638else
9639 case $ac_pt_PKG_CONFIG in
9640 [\\/]* | ?:[\\/]*)
9641 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9642 ;;
9643 *)
9644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9645for as_dir in $PATH
9646do
9647 IFS=$as_save_IFS
9648 test -z "$as_dir" && as_dir=.
9649 for ac_exec_ext in '' $ac_executable_extensions; do
9650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9651 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9652 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9653 break 2
9654 fi
9655done
9656 done
9657IFS=$as_save_IFS
9658
9659 ;;
9660esac
9661fi
9662ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9663if test -n "$ac_pt_PKG_CONFIG"; then
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9665$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9666else
9667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9668$as_echo "no" >&6; }
9669fi
9670
9671 if test "x$ac_pt_PKG_CONFIG" = x; then
9672 PKG_CONFIG=""
9673 else
9674 case $cross_compiling:$ac_tool_warned in
9675yes:)
9676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9678ac_tool_warned=yes ;;
9679esac
9680 PKG_CONFIG=$ac_pt_PKG_CONFIG
9681 fi
9682else
9683 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9684fi
9685
9686fi
9687if test -n "$PKG_CONFIG"; then
9688 _pkg_min_version=0.9.0
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9690$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9691 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9693$as_echo "yes" >&6; }
9694 else
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9696$as_echo "no" >&6; }
9697 PKG_CONFIG=""
9698 fi
9699fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009700
9701# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9703$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009704
9705# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009706if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009707 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009708else
9709 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009710fi
9711
9712
Matthias Kloseb9621712010-04-24 17:59:49 +00009713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9714$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009715
9716# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9718$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009719
9720# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009721if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009722 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009723else
9724 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009725fi
9726
9727
9728if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009729 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9730else
9731 LIBFFI_INCLUDEDIR=""
9732fi
9733
9734
Matthias Kloseb9621712010-04-24 17:59:49 +00009735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9736$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009737
Stefan Krah60187b52012-03-23 19:06:27 +01009738# Check for use of the system libmpdec library
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9740$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9741
9742# Check whether --with-system_libmpdec was given.
9743if test "${with_system_libmpdec+set}" = set; then :
9744 withval=$with_system_libmpdec;
9745else
9746 with_system_libmpdec="no"
9747fi
9748
9749
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9751$as_echo "$with_system_libmpdec" >&6; }
9752
Benjamin Peterson076ed002010-10-31 17:11:02 +00009753# Check for support for loadable sqlite extensions
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9755$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9756# Check whether --enable-loadable-sqlite-extensions was given.
9757if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9758 enableval=$enable_loadable_sqlite_extensions;
9759else
9760 enable_loadable_sqlite_extensions="no"
9761fi
9762
9763
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9765$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9766
Ned Deilyd819b932013-09-06 01:07:05 -07009767# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9768
9769
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9771$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9772
9773# Check whether --with-tcltk-includes was given.
9774if test "${with_tcltk_includes+set}" = set; then :
9775 withval=$with_tcltk_includes;
9776else
9777 with_tcltk_includes="default"
9778fi
9779
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9781$as_echo "$with_tcltk_includes" >&6; }
9782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9783$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9784
9785# Check whether --with-tcltk-libs was given.
9786if test "${with_tcltk_libs+set}" = set; then :
9787 withval=$with_tcltk_libs;
9788else
9789 with_tcltk_libs="default"
9790fi
9791
9792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9793$as_echo "$with_tcltk_libs" >&6; }
9794if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9795then
9796 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9797 then
9798 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9799 fi
9800 TCLTK_INCLUDES=""
9801 TCLTK_LIBS=""
9802else
9803 TCLTK_INCLUDES="$with_tcltk_includes"
9804 TCLTK_LIBS="$with_tcltk_libs"
9805fi
9806
Matthias Klose55708cc2009-04-30 08:06:49 +00009807# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9809$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009810
9811# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009812if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009813 withval=$with_dbmliborder;
9814if test x$with_dbmliborder = xyes
9815then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009816as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009817else
9818 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9819 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9820 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009821 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009822 fi
9823 done
9824fi
9825fi
9826
Matthias Kloseb9621712010-04-24 17:59:49 +00009827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9828$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009829
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009830# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009831
9832
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9834$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009837if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838 withval=$with_signal_module;
9839fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009840
9841
9842if test -z "$with_signal_module"
9843then with_signal_module="yes"
9844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9846$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009847
9848if test "${with_signal_module}" = "yes"; then
9849 USE_SIGNAL_MODULE=""
9850 SIGNAL_OBJS=""
9851else
9852 USE_SIGNAL_MODULE="#"
9853 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9854fi
9855
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009856# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009857
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009858USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009859
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860
Martin v. Löwis11437992002-04-12 09:54:03 +00009861
9862# Templates for things AC_DEFINEd more than once.
9863# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009864
9865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866
Matthias Kloseb9621712010-04-24 17:59:49 +00009867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9868$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009871if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872 withval=$with_threads;
9873fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009874
9875
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009876# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009879if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880 withval=$with_thread; with_threads=$with_thread
9881fi
9882
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009883
9884if test -z "$with_threads"
9885then with_threads="yes"
9886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9888$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009889
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009890
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009891if test "$with_threads" = "no"
9892then
9893 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009894elif test "$ac_cv_pthread_is_default" = yes
9895then
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009897
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009898 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009900
9901 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009902 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009903elif test "$ac_cv_kpthread" = "yes"
9904then
9905 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009906 if test "$ac_cv_cxx_thread" = "yes"; then
9907 CXX="$CXX -Kpthread"
9908 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009910
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009911 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009912 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009913elif test "$ac_cv_kthread" = "yes"
9914then
9915 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009916 if test "$ac_cv_cxx_thread" = "yes"; then
9917 CXX="$CXX -Kthread"
9918 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009919 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009920
9921 posix_threads=yes
9922 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009923elif test "$ac_cv_pthread" = "yes"
9924then
9925 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009926 if test "$ac_cv_cxx_thread" = "yes"; then
9927 CXX="$CXX -pthread"
9928 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009930
9931 posix_threads=yes
9932 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009933else
9934 if test ! -z "$with_threads" -a -d "$with_threads"
9935 then LDFLAGS="$LDFLAGS -L$with_threads"
9936 fi
9937 if test ! -z "$withval" -a -d "$withval"
9938 then LDFLAGS="$LDFLAGS -L$withval"
9939 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009940
9941 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009942 # define _POSIX_THREADS in unistd.h. Some apparently don't
9943 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9945$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009947/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009948
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009949#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009950#ifdef _POSIX_THREADS
9951yes
9952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009953
9954_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009957 unistd_defines_pthreads=yes
9958else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009959 unistd_defines_pthreads=no
9960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009961rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009962
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9964$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009965
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009967
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009968 # Just looking for pthread_create in libpthread is not enough:
9969 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9970 # So we really have to include pthread.h, and then link.
9971 _libs=$LIBS
9972 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9974$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009976/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009977
9978#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009979#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009980
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009981void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009982int
9983main ()
9984{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009985
9986pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 ;
9988 return 0;
9989}
9990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009991if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009992
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9994$as_echo "yes" >&6; }
9995 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009996
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009997 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009998 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009999else
Martin v. Löwis11437992002-04-12 09:54:03 +000010000
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010001 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010003if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010005
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010006 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010007 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010008else
Guido van Rossumad678af1998-10-02 14:42:15 +000010009
Matthias Kloseb9621712010-04-24 17:59:49 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10011$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010012if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010016LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010020/* Override any GCC internal prototype to avoid an error.
10021 Use char because int might match the return type of a GCC
10022 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010023#ifdef __cplusplus
10024extern "C"
10025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010026char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010027int
10028main ()
10029{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010031 ;
10032 return 0;
10033}
10034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010035if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010037else
Matthias Kloseb9621712010-04-24 17:59:49 +000010038 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010040rm -f core conftest.err conftest.$ac_objext \
10041 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010042LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10045$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010046if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010047 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010049 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010050 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010051 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010052else
Greg Steinadf63d62000-07-05 10:38:09 +000010053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10055$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010056if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010057 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010058else
Martin v. Löwis11437992002-04-12 09:54:03 +000010059 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010060LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064/* Override any GCC internal prototype to avoid an error.
10065 Use char because int might match the return type of a GCC
10066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010067#ifdef __cplusplus
10068extern "C"
10069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010070char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010071int
10072main ()
10073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 ;
10076 return 0;
10077}
10078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010081else
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084rm -f core conftest.err conftest.$ac_objext \
10085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010086LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10089$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010090if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010093 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010094 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010095 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010096else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10099$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010100if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010102else
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010104LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108/* Override any GCC internal prototype to avoid an error.
10109 Use char because int might match the return type of a GCC
10110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010111#ifdef __cplusplus
10112extern "C"
10113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010114char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010115int
10116main ()
10117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 ;
10120 return 0;
10121}
10122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010125else
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010128rm -f core conftest.err conftest.$ac_objext \
10129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010130LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10133$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010134if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010136
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010137 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010138 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010139 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010140else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10143$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010144if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010146else
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010148LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152/* Override any GCC internal prototype to avoid an error.
10153 Use char because int might match the return type of a GCC
10154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010155#ifdef __cplusplus
10156extern "C"
10157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010158char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010159int
10160main ()
10161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 ;
10164 return 0;
10165}
10166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010169else
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010172rm -f core conftest.err conftest.$ac_objext \
10173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010174LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10177$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010178if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010180
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010181 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010182 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010183 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010184else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010185
Martin v. Löwis130fb172001-07-19 11:00:41 +000010186 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010187fi
10188
Guido van Rossum627b2d71993-12-24 10:39:16 +000010189
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010190fi
10191
Guido van Rossum0be3e491997-05-22 20:33:33 +000010192fi
10193
Guido van Rossum49545951997-12-02 19:28:29 +000010194fi
10195
Guido van Rossumb93a8621998-05-07 13:27:32 +000010196fi
10197
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010199rm -f core conftest.err conftest.$ac_objext \
10200 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010201
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10203$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010204if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010206else
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010208LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212/* Override any GCC internal prototype to avoid an error.
10213 Use char because int might match the return type of a GCC
10214 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215#ifdef __cplusplus
10216extern "C"
10217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010218char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010219int
10220main ()
10221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 ;
10224 return 0;
10225}
10226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010229else
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010232rm -f core conftest.err conftest.$ac_objext \
10233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010234LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10237$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010238if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010240
Martin v. Löwis130fb172001-07-19 11:00:41 +000010241 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010242 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010243 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010244fi
10245
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010246
Neal Norwitza978ab02002-11-02 16:58:05 +000010247 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10249$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010250if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010252else
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010254LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258/* Override any GCC internal prototype to avoid an error.
10259 Use char because int might match the return type of a GCC
10260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010261#ifdef __cplusplus
10262extern "C"
10263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010264char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010265int
10266main ()
10267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 ;
10270 return 0;
10271}
10272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010273if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010275else
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010278rm -f core conftest.err conftest.$ac_objext \
10279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010280LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10283$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010284if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010286
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010287 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010288 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010289 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010290fi
10291
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010292 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010293fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010294
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010295if test "$posix_threads" = "yes"; then
10296 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010299
10300 fi
10301
10302 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10303 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010304 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010305$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010306
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010307 ;;
10308 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010309$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010310
10311 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010312 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010313$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010314
10315 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010316 esac
10317
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10319$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010320 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010322else
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010324 ac_cv_pthread_system_supported=no
10325else
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010327/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010328
10329 #include <stdio.h>
10330 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010331 void *foo(void *parm) {
10332 return NULL;
10333 }
10334 main() {
10335 pthread_attr_t attr;
10336 pthread_t id;
10337 if (pthread_attr_init(&attr)) exit(-1);
10338 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10339 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10340 exit(0);
10341 }
10342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010344 ac_cv_pthread_system_supported=yes
10345else
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10349 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010350fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352
Guido van Rossum627b2d71993-12-24 10:39:16 +000010353fi
10354
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10356$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010357 if test "$ac_cv_pthread_system_supported" = "yes"; then
10358
Matthias Kloseb9621712010-04-24 17:59:49 +000010359$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010360
10361 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 for ac_func in pthread_sigmask
10363do :
10364 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010365if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010366 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010367#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010368_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010369 case $ac_sys_system in
10370 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010371
Matthias Kloseb9621712010-04-24 17:59:49 +000010372$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010373
10374 ;;
10375 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010376fi
10377done
10378
Christian Heimesf77b4b22013-08-21 13:26:05 +020010379 for ac_func in pthread_atfork
10380do :
10381 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10382if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10383 cat >>confdefs.h <<_ACEOF
10384#define HAVE_PTHREAD_ATFORK 1
10385_ACEOF
10386
10387fi
10388done
10389
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010390fi
10391
10392
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010393# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Matthias Kloseb9621712010-04-24 17:59:49 +000010395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10396$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010398if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010400 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010403 ipv6=no
10404 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10406$as_echo "yes" >&6; }
10407 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010408
10409 ipv6=yes
10410 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010412else
Martin v. Löwis11437992002-04-12 09:54:03 +000010413
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010415/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010416 /* AF_INET6 available check */
10417#include <sys/types.h>
10418#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010419int
10420main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010421{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010422int domain = AF_INET6;
10423 ;
10424 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010425}
Martin v. Löwis11437992002-04-12 09:54:03 +000010426_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010427if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010428
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10430$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010431 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010432
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010433else
Matthias Kloseb159a552010-04-25 21:00:44 +000010434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10436$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010437 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010438
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010439fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010441
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010442if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10444$as_echo_n "checking if RFC2553 API is available... " >&6; }
10445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010446/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010447
10448 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010449#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010450int
10451main ()
10452{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010453struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010454 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010455 ;
10456 return 0;
10457}
Matthias Kloseb159a552010-04-25 21:00:44 +000010458
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010461
10462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010463$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010464 ipv6=yes
10465
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010466else
Matthias Kloseb159a552010-04-25 21:00:44 +000010467
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010469$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010470 ipv6=no
10471
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010474fi
10475
10476if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010478
10479fi
10480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010481fi
10482
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010483
10484ipv6type=unknown
10485ipv6lib=none
10486ipv6trylibc=no
10487
10488if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10490$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010491 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10492 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010493 case $i in
10494 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010496/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010497
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010498#include <netinet/in.h>
10499#ifdef IPV6_INRIA_VERSION
10500yes
10501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010502_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010505 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010506fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010507rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010508
10509 ;;
10510 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010513
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010514#include <netinet/in.h>
10515#ifdef __KAME__
10516yes
10517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010518_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010521 ipv6type=$i;
10522 ipv6lib=inet6
10523 ipv6libdir=/usr/local/v6/lib
10524 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010525fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010526rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010527
10528 ;;
10529 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010531/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010532
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010533#include <features.h>
10534#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10535yes
10536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010537_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010540 ipv6type=$i;
10541 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010543rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010544
10545 ;;
10546 linux-inet6)
10547 if test -d /usr/inet6; then
10548 ipv6type=$i
10549 ipv6lib=inet6
10550 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010551 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010552 fi
10553 ;;
10554 solaris)
10555 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010556 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010557 ipv6type=$i
10558 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010559 fi
10560 fi
10561 ;;
10562 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010565
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010566#include <sys/param.h>
10567#ifdef _TOSHIBA_INET6
10568yes
10569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010570_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010573 ipv6type=$i;
10574 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010575 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010576fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010577rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010578
10579 ;;
10580 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010582/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010583
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010584#include </usr/local/v6/include/sys/v6config.h>
10585#ifdef __V6D__
10586yes
10587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010588_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010591 ipv6type=$i;
10592 ipv6lib=v6;
10593 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010594 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010595fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010596rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010597
10598 ;;
10599 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010601/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010602
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603#include <sys/param.h>
10604#ifdef _ZETA_MINAMI_INET6
10605yes
10606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010610 ipv6type=$i;
10611 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010612 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010614rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010615
10616 ;;
10617 esac
10618 if test "$ipv6type" != "unknown"; then
10619 break
10620 fi
10621 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10623$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010624fi
10625
10626if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10627 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10628 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10629 echo "using lib$ipv6lib"
10630 else
10631 if test $ipv6trylibc = "yes"; then
10632 echo "using libc"
10633 else
10634 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10635 echo "You need to fetch lib$ipv6lib.a from appropriate"
10636 echo 'ipv6 kit and compile beforehand.'
10637 exit 1
10638 fi
10639 fi
10640fi
10641
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10643$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10645/* end confdefs.h. */
10646 /* CAN_RAW_FD_FRAMES available check */
10647#include <linux/can/raw.h>
10648int
10649main ()
10650{
10651int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10652 ;
10653 return 0;
10654}
10655_ACEOF
10656if ac_fn_c_try_compile "$LINENO"; then :
10657
10658
10659$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10660
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10662$as_echo "yes" >&6; }
10663
10664else
10665
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10667$as_echo "no" >&6; }
10668
10669fi
10670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10671
Matthias Kloseb9621712010-04-24 17:59:49 +000010672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10673$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010675/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010676
10677 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010678int
10679main ()
10680{
10681FSIORefNum fRef = 0
10682 ;
10683 return 0;
10684}
Matthias Kloseb159a552010-04-25 21:00:44 +000010685
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010687if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010688
Matthias Kloseb159a552010-04-25 21:00:44 +000010689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010691
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10693$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010694
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010695else
Matthias Kloseb159a552010-04-25 21:00:44 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010699
10700fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10702
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010703# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10705$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010708if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709 withval=$with_doc_strings;
10710fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010711
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010712
10713if test -z "$with_doc_strings"
10714then with_doc_strings="yes"
10715fi
10716if test "$with_doc_strings" != "no"
10717then
10718
Matthias Kloseb9621712010-04-24 17:59:49 +000010719$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010720
10721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10723$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010724
Antoine Pitrou042b1282010-08-13 21:15:58 +000010725# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10727$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010730if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010731 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010732if test "$withval" != no
10733then
10734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10738$as_echo "yes" >&6; }
10739else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010741fi
10742else
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10744$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745fi
10746
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010747
10748# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10750$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010753if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010754 withval=$with_pymalloc;
10755fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010756
Neil Schemenauera35c6882001-02-27 04:45:05 +000010757
Neil Schemenauer16c22972002-03-22 15:34:49 +000010758if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010759then
10760 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010761fi
10762if test "$with_pymalloc" != "no"
10763then
Martin v. Löwis11437992002-04-12 09:54:03 +000010764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010766
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010767 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10770$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010771
Benjamin Peterson05159c42009-12-03 03:01:27 +000010772# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10774$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010775
10776# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010778 withval=$with_valgrind;
10779else
10780 with_valgrind=no
10781fi
10782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10784$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010785if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 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 +020010787if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010790
10791else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010792 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010793
10794fi
10795
10796
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010797 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010798fi
10799
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010800# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010801
Guido van Rossum98935bf2001-09-05 19:13:16 +000010802DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010803
Guido van Rossume97ee181999-12-20 21:27:22 +000010804# the dlopen() function means we might want to use dynload_shlib.o. some
10805# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010806for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010807do :
10808 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010809if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010811#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010812_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010813
Guido van Rossume97ee181999-12-20 21:27:22 +000010814fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010815done
Guido van Rossume97ee181999-12-20 21:27:22 +000010816
Michael W. Hudson54241132001-12-07 15:38:26 +000010817
Guido van Rossume97ee181999-12-20 21:27:22 +000010818# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10819# loading of modules.
10820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10822$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010823if test -z "$DYNLOADFILE"
10824then
10825 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010826 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10827 if test "$ac_cv_func_dlopen" = yes
10828 then DYNLOADFILE="dynload_shlib.o"
10829 else DYNLOADFILE="dynload_aix.o"
10830 fi
10831 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010832 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010833 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10834 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010835 *)
10836 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10837 # out any dynamic loading
10838 if test "$ac_cv_func_dlopen" = yes
10839 then DYNLOADFILE="dynload_shlib.o"
10840 else DYNLOADFILE="dynload_stub.o"
10841 fi
10842 ;;
10843 esac
10844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10846$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010847if test "$DYNLOADFILE" != "dynload_stub.o"
10848then
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010851
10852fi
10853
Neil Schemenauer4e425612001-06-19 15:44:15 +000010854# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10855
Michael W. Hudson54241132001-12-07 15:38:26 +000010856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10858$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010859if test -z "$MACHDEP_OBJS"
10860then
Jack Jansene578a632001-08-15 01:27:14 +000010861 MACHDEP_OBJS=$extra_machdep_objs
10862else
10863 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010864fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010865if test -z "$MACHDEP_OBJS"; then
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10867$as_echo "none" >&6; }
10868else
10869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10870$as_echo "$MACHDEP_OBJS" >&6; }
10871fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010872
Guido van Rossum627b2d71993-12-24 10:39:16 +000010873# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010874for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010875 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010876 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010877 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010878 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010879 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010880 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010881 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10882 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010883 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010884 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010885 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010886 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010887 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010888 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010889 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10890 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010891 sigaction sigaltstack siginterrupt sigpending sigrelse \
10892 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010893 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010894 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010895 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010896do :
10897 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10898ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010899if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010901#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010902_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010903
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010904fi
10905done
10906
Michael W. Hudson54241132001-12-07 15:38:26 +000010907
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010908ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10909 #include <dirent.h>
10910"
10911if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10912
10913$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10914
10915fi
10916
10917
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010918# For some functions, having a definition is not sufficient, since
10919# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10921$as_echo_n "checking for chroot... " >&6; }
10922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010923/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010924#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010925int
10926main ()
10927{
10928void *x=chroot
10929 ;
10930 return 0;
10931}
10932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010933if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010934
Matthias Kloseb9621712010-04-24 17:59:49 +000010935$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010936
Matthias Kloseb159a552010-04-25 21:00:44 +000010937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010938$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010939else
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10941$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010942
10943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10946$as_echo_n "checking for link... " >&6; }
10947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010948/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010949#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010950int
10951main ()
10952{
10953void *x=link
10954 ;
10955 return 0;
10956}
10957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010961
Matthias Kloseb159a552010-04-25 21:00:44 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010964else
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010967
10968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10971$as_echo_n "checking for symlink... " >&6; }
10972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010974#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010975int
10976main ()
10977{
10978void *x=symlink
10979 ;
10980 return 0;
10981}
10982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010984
Matthias Kloseb9621712010-04-24 17:59:49 +000010985$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010986
Matthias Kloseb159a552010-04-25 21:00:44 +000010987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010989else
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10991$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010992
10993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10996$as_echo_n "checking for fchdir... " >&6; }
10997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010998/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010999#include <unistd.h>
11000int
11001main ()
11002{
11003void *x=fchdir
11004 ;
11005 return 0;
11006}
11007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011008if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011011
Matthias Kloseb159a552010-04-25 21:00:44 +000011012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011013$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011014else
Matthias Kloseb9621712010-04-24 17:59:49 +000011015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011017
11018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11021$as_echo_n "checking for fsync... " >&6; }
11022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011023/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011024#include <unistd.h>
11025int
11026main ()
11027{
11028void *x=fsync
11029 ;
11030 return 0;
11031}
11032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011034
Matthias Kloseb9621712010-04-24 17:59:49 +000011035$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011036
Matthias Kloseb159a552010-04-25 21:00:44 +000011037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011038$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011039else
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11041$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011042
11043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11046$as_echo_n "checking for fdatasync... " >&6; }
11047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011048/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011049#include <unistd.h>
11050int
11051main ()
11052{
11053void *x=fdatasync
11054 ;
11055 return 0;
11056}
11057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011059
Matthias Kloseb9621712010-04-24 17:59:49 +000011060$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011061
Matthias Kloseb159a552010-04-25 21:00:44 +000011062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011063$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011064else
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11066$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011067
11068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11071$as_echo_n "checking for epoll... " >&6; }
11072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011073/* end confdefs.h. */
11074#include <sys/epoll.h>
11075int
11076main ()
11077{
11078void *x=epoll_create
11079 ;
11080 return 0;
11081}
11082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011086
Matthias Kloseb159a552010-04-25 21:00:44 +000011087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011088$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011089else
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011092
11093fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11096$as_echo_n "checking for epoll_create1... " >&6; }
11097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11098/* end confdefs.h. */
11099#include <sys/epoll.h>
11100int
11101main ()
11102{
11103void *x=epoll_create1
11104 ;
11105 return 0;
11106}
11107_ACEOF
11108if ac_fn_c_try_compile "$LINENO"; then :
11109
11110$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11111
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11113$as_echo "yes" >&6; }
11114else
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11116$as_echo "no" >&6; }
11117
11118fi
11119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11121$as_echo_n "checking for kqueue... " >&6; }
11122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011123/* end confdefs.h. */
11124
11125#include <sys/types.h>
11126#include <sys/event.h>
11127
11128int
11129main ()
11130{
11131int x=kqueue()
11132 ;
11133 return 0;
11134}
11135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011136if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011137
Matthias Kloseb9621712010-04-24 17:59:49 +000011138$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011139
Matthias Kloseb159a552010-04-25 21:00:44 +000011140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011141$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011142else
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11144$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011145
11146fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11149$as_echo_n "checking for prlimit... " >&6; }
11150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11151/* end confdefs.h. */
11152
11153#include <sys/time.h>
11154#include <sys/resource.h>
11155
11156int
11157main ()
11158{
11159void *x=prlimit
11160 ;
11161 return 0;
11162}
11163_ACEOF
11164if ac_fn_c_try_compile "$LINENO"; then :
11165
11166$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11167
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11169$as_echo "yes" >&6; }
11170else
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11172$as_echo "no" >&6; }
11173
11174fi
11175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11176
Martin v. Löwisd5843682002-11-21 20:41:28 +000011177# On some systems (eg. FreeBSD 5), we would find a definition of the
11178# functions ctermid_r, setgroups in the library, but no prototype
11179# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11180# address to avoid compiler warnings and potential miscompilations
11181# because of the missing prototypes.
11182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11184$as_echo_n "checking for ctermid_r... " >&6; }
11185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011186/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011187
Martin v. Löwisd5843682002-11-21 20:41:28 +000011188#include <stdio.h>
11189
Martin v. Löwisd5843682002-11-21 20:41:28 +000011190int
11191main ()
11192{
11193void* p = ctermid_r
11194 ;
11195 return 0;
11196}
11197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011199
Matthias Kloseb9621712010-04-24 17:59:49 +000011200$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011201
Matthias Kloseb159a552010-04-25 21:00:44 +000011202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011203$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011204else
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11206$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011207
11208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11210
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11212$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011213if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011214 $as_echo_n "(cached) " >&6
11215else
11216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011218#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011219int
11220main ()
11221{
11222void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011223
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011224 ;
11225 return 0;
11226}
11227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011228if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011229 ac_cv_flock_decl=yes
11230else
11231 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011232
11233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011235
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011236fi
11237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11238$as_echo "$ac_cv_flock_decl" >&6; }
11239if test "x${ac_cv_flock_decl}" = xyes; then
11240 for ac_func in flock
11241do :
11242 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011243if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011244 cat >>confdefs.h <<_ACEOF
11245#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011246_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011247
Antoine Pitroua3000072010-09-07 14:52:42 +000011248else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011250$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011251if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011252 $as_echo_n "(cached) " >&6
11253else
11254 ac_check_lib_save_LIBS=$LIBS
11255LIBS="-lbsd $LIBS"
11256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11257/* end confdefs.h. */
11258
11259/* Override any GCC internal prototype to avoid an error.
11260 Use char because int might match the return type of a GCC
11261 builtin and then its argument prototype would still apply. */
11262#ifdef __cplusplus
11263extern "C"
11264#endif
11265char flock ();
11266int
11267main ()
11268{
11269return flock ();
11270 ;
11271 return 0;
11272}
11273_ACEOF
11274if ac_fn_c_try_link "$LINENO"; then :
11275 ac_cv_lib_bsd_flock=yes
11276else
11277 ac_cv_lib_bsd_flock=no
11278fi
11279rm -f core conftest.err conftest.$ac_objext \
11280 conftest$ac_exeext conftest.$ac_ext
11281LIBS=$ac_check_lib_save_LIBS
11282fi
11283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11284$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011285if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011286 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011287
11288
11289$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11290
11291
11292fi
11293
11294
11295fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011296done
11297
Antoine Pitroua3000072010-09-07 14:52:42 +000011298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011299
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11301$as_echo_n "checking for getpagesize... " >&6; }
11302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011304
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011305#include <unistd.h>
11306
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011307int
11308main ()
11309{
11310void* p = getpagesize
11311 ;
11312 return 0;
11313}
11314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011318
Matthias Kloseb159a552010-04-25 21:00:44 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011321else
Matthias Kloseb9621712010-04-24 17:59:49 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11323$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011324
11325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011327
Victor Stinner984890f2011-11-24 13:53:38 +010011328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11329$as_echo_n "checking for broken unsetenv... " >&6; }
11330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11331/* end confdefs.h. */
11332
11333#include <stdlib.h>
11334
11335int
11336main ()
11337{
11338int res = unsetenv("DUMMY")
11339 ;
11340 return 0;
11341}
11342_ACEOF
11343if ac_fn_c_try_compile "$LINENO"; then :
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11345$as_echo "no" >&6; }
11346else
11347
11348$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11349
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11351$as_echo "yes" >&6; }
11352
11353fi
11354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11355
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011356for ac_prog in true
11357do
11358 # Extract the first word of "$ac_prog", so it can be a program name with args.
11359set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11361$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011362if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011364else
11365 if test -n "$TRUE"; then
11366 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11367else
11368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11369for as_dir in $PATH
11370do
11371 IFS=$as_save_IFS
11372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011375 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 $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 +000011377 break 2
11378 fi
11379done
Matthias Kloseb9621712010-04-24 17:59:49 +000011380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011381IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011382
11383fi
11384fi
11385TRUE=$ac_cv_prog_TRUE
11386if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11388$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011389else
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011392fi
11393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011395 test -n "$TRUE" && break
11396done
11397test -n "$TRUE" || TRUE="/bin/true"
11398
11399
Matthias Kloseb9621712010-04-24 17:59:49 +000011400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11401$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011402if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011404else
11405 ac_check_lib_save_LIBS=$LIBS
11406LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410/* Override any GCC internal prototype to avoid an error.
11411 Use char because int might match the return type of a GCC
11412 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011413#ifdef __cplusplus
11414extern "C"
11415#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011416char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011417int
11418main ()
11419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011421 ;
11422 return 0;
11423}
11424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011426 ac_cv_lib_c_inet_aton=yes
11427else
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011430rm -f core conftest.err conftest.$ac_objext \
11431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011432LIBS=$ac_check_lib_save_LIBS
11433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11435$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011436if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011437 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011438else
Matthias Kloseb9621712010-04-24 17:59:49 +000011439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11440$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011441if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011442 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011443else
11444 ac_check_lib_save_LIBS=$LIBS
11445LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011447/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011449/* Override any GCC internal prototype to avoid an error.
11450 Use char because int might match the return type of a GCC
11451 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011452#ifdef __cplusplus
11453extern "C"
11454#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011455char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011456int
11457main ()
11458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011460 ;
11461 return 0;
11462}
11463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011465 ac_cv_lib_resolv_inet_aton=yes
11466else
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011469rm -f core conftest.err conftest.$ac_objext \
11470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011471LIBS=$ac_check_lib_save_LIBS
11472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11474$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011475if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011476 cat >>confdefs.h <<_ACEOF
11477#define HAVE_LIBRESOLV 1
11478_ACEOF
11479
11480 LIBS="-lresolv $LIBS"
11481
11482fi
11483
11484
11485fi
11486
11487
Christian Heimesd0764e22007-12-04 15:00:33 +000011488# On Tru64, chflags seems to be present, but calling it will
11489# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11491$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011492if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011494else
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011496 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011497else
Matthias Kloseb9621712010-04-24 17:59:49 +000011498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011499/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011500
Christian Heimesd0764e22007-12-04 15:00:33 +000011501#include <sys/stat.h>
11502#include <unistd.h>
11503int main(int argc, char*argv[])
11504{
11505 if(chflags(argv[0], 0) != 0)
11506 return 1;
11507 return 0;
11508}
Ned Deily3eb67d52011-06-28 00:00:28 -070011509
Christian Heimesd0764e22007-12-04 15:00:33 +000011510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011511if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011512 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011513else
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11517 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011518fi
11519
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011520
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11523$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011524if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011526if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011527 ac_cv_have_chflags="yes"
11528else
11529 ac_cv_have_chflags="no"
11530fi
11531
11532fi
11533if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011536
11537fi
11538
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11540$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011541if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011543else
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011545 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011546else
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011548/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011549
Christian Heimesd0764e22007-12-04 15:00:33 +000011550#include <sys/stat.h>
11551#include <unistd.h>
11552int main(int argc, char*argv[])
11553{
11554 if(lchflags(argv[0], 0) != 0)
11555 return 1;
11556 return 0;
11557}
Ned Deily3eb67d52011-06-28 00:00:28 -070011558
Christian Heimesd0764e22007-12-04 15:00:33 +000011559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011560if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011561 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011562else
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11566 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011567fi
11568
11569
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11572$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011573if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011575if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011576 ac_cv_have_lchflags="yes"
11577else
11578 ac_cv_have_lchflags="no"
11579fi
11580
11581fi
11582if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011583
Matthias Kloseb9621712010-04-24 17:59:49 +000011584$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011585
11586fi
11587
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011588case $ac_sys_system/$ac_sys_release in
11589Darwin/*)
11590 _CUR_CFLAGS="${CFLAGS}"
11591 _CUR_LDFLAGS="${LDFLAGS}"
11592 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11593 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11594 ;;
11595esac
11596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11598$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011599if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011601else
11602 ac_check_lib_save_LIBS=$LIBS
11603LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011605/* end confdefs.h. */
11606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607/* Override any GCC internal prototype to avoid an error.
11608 Use char because int might match the return type of a GCC
11609 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011610#ifdef __cplusplus
11611extern "C"
11612#endif
11613char inflateCopy ();
11614int
11615main ()
11616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011618 ;
11619 return 0;
11620}
11621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011623 ac_cv_lib_z_inflateCopy=yes
11624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011627rm -f core conftest.err conftest.$ac_objext \
11628 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011629LIBS=$ac_check_lib_save_LIBS
11630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11632$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011633if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011636
11637fi
11638
11639
11640case $ac_sys_system/$ac_sys_release in
11641Darwin/*)
11642 CFLAGS="${_CUR_CFLAGS}"
11643 LDFLAGS="${_CUR_LDFLAGS}"
11644 ;;
11645esac
11646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11648$as_echo_n "checking for hstrerror... " >&6; }
11649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011650/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011651
Martin v. Löwise9416172003-05-03 10:12:45 +000011652#include <netdb.h>
11653
Martin v. Löwise9416172003-05-03 10:12:45 +000011654int
11655main ()
11656{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011657void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011658 ;
11659 return 0;
11660}
11661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011662if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011665
Matthias Kloseb159a552010-04-25 21:00:44 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011667$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011668else
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11670$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011671
11672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011673rm -f core conftest.err conftest.$ac_objext \
11674 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11677$as_echo_n "checking for inet_aton... " >&6; }
11678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011679/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011680
Martin v. Löwis86d66262006-02-17 08:40:11 +000011681#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011682#include <sys/socket.h>
11683#include <netinet/in.h>
11684#include <arpa/inet.h>
11685
Martin v. Löwise9416172003-05-03 10:12:45 +000011686int
11687main ()
11688{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011689void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011690 ;
11691 return 0;
11692}
11693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011697
Matthias Kloseb159a552010-04-25 21:00:44 +000011698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011699$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011700else
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11702$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011703
11704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011705rm -f core conftest.err conftest.$ac_objext \
11706 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011707
Matthias Kloseb9621712010-04-24 17:59:49 +000011708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11709$as_echo_n "checking for inet_pton... " >&6; }
11710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011711/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011712
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011713#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011714#include <sys/socket.h>
11715#include <netinet/in.h>
11716#include <arpa/inet.h>
11717
Martin v. Löwise9416172003-05-03 10:12:45 +000011718int
11719main ()
11720{
11721void* p = inet_pton
11722 ;
11723 return 0;
11724}
11725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011726if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011729
Matthias Kloseb159a552010-04-25 21:00:44 +000011730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011731$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11734$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011735
11736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011738
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011739# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11741$as_echo_n "checking for setgroups... " >&6; }
11742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011743/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011744
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011745#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011746#ifdef HAVE_GRP_H
11747#include <grp.h>
11748#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011749
Martin v. Löwisd5843682002-11-21 20:41:28 +000011750int
11751main ()
11752{
11753void* p = setgroups
11754 ;
11755 return 0;
11756}
11757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011758if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011759
Matthias Kloseb9621712010-04-24 17:59:49 +000011760$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011761
Matthias Kloseb159a552010-04-25 21:00:44 +000011762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011764else
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11766$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011767
11768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011770
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011771# check for openpty and forkpty
11772
11773for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011774do :
11775 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011776if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011778#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011779_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11783$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011784if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011786else
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011788LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011792/* Override any GCC internal prototype to avoid an error.
11793 Use char because int might match the return type of a GCC
11794 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011795#ifdef __cplusplus
11796extern "C"
11797#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011798char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011799int
11800main ()
11801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 ;
11804 return 0;
11805}
11806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011812rm -f core conftest.err conftest.$ac_objext \
11813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011814LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11817$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011818if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011820 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011821else
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11823$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011824if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011826else
11827 ac_check_lib_save_LIBS=$LIBS
11828LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011830/* end confdefs.h. */
11831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011832/* Override any GCC internal prototype to avoid an error.
11833 Use char because int might match the return type of a GCC
11834 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011835#ifdef __cplusplus
11836extern "C"
11837#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011838char openpty ();
11839int
11840main ()
11841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011843 ;
11844 return 0;
11845}
11846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011848 ac_cv_lib_bsd_openpty=yes
11849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011852rm -f core conftest.err conftest.$ac_objext \
11853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011854LIBS=$ac_check_lib_save_LIBS
11855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11857$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011858if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011860 LIBS="$LIBS -lbsd"
11861fi
11862
11863
11864fi
11865
Fred Drake8cef4cf2000-06-28 16:40:38 +000011866
11867fi
11868done
11869
11870for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011871do :
11872 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011873if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011875#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011876_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011877
Fred Drake8cef4cf2000-06-28 16:40:38 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11880$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011881if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011883else
Martin v. Löwis11437992002-04-12 09:54:03 +000011884 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011885LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011889/* Override any GCC internal prototype to avoid an error.
11890 Use char because int might match the return type of a GCC
11891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011892#ifdef __cplusplus
11893extern "C"
11894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011895char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011896int
11897main ()
11898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011899return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 ;
11901 return 0;
11902}
11903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011905 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011909rm -f core conftest.err conftest.$ac_objext \
11910 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011911LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11914$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011915if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011917 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11920$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011921if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011923else
11924 ac_check_lib_save_LIBS=$LIBS
11925LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011927/* end confdefs.h. */
11928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011929/* Override any GCC internal prototype to avoid an error.
11930 Use char because int might match the return type of a GCC
11931 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011932#ifdef __cplusplus
11933extern "C"
11934#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011935char forkpty ();
11936int
11937main ()
11938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011939return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011940 ;
11941 return 0;
11942}
11943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011945 ac_cv_lib_bsd_forkpty=yes
11946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011949rm -f core conftest.err conftest.$ac_objext \
11950 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011951LIBS=$ac_check_lib_save_LIBS
11952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11954$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011955if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011957 LIBS="$LIBS -lbsd"
11958fi
11959
11960
11961fi
11962
Fred Drake8cef4cf2000-06-28 16:40:38 +000011963
11964fi
11965done
11966
Jack Jansendd19cf82001-12-06 22:36:17 +000011967
Christian Heimesb186d002008-03-18 15:15:01 +000011968# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011969for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011970do :
11971 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011972if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011973 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011974#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011975_ACEOF
11976
11977fi
11978done
11979
11980
Michael W. Hudson54241132001-12-07 15:38:26 +000011981# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011982for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011983do :
11984 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11985ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011986if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011989_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011990
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011991fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011992done
11993
Michael W. Hudson54241132001-12-07 15:38:26 +000011994
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011995ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011996if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011997 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011998
Martin v. Löwis1142de32002-03-29 16:28:31 +000011999else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012000 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012001 *" dup2.$ac_objext "* ) ;;
12002 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012003 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012004esac
12005
Martin v. Löwis1142de32002-03-29 16:28:31 +000012006fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012007
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012008ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012009if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012010 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12011
12012else
12013 case " $LIBOBJS " in
12014 *" strdup.$ac_objext "* ) ;;
12015 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12016 ;;
12017esac
12018
12019fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012020
12021
12022for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012023do :
12024 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012025if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012026 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012027#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012030/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012031#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012032int
12033main ()
12034{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012035getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012036 ;
12037 return 0;
12038}
12039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
Matthias Kloseb9621712010-04-24 17:59:49 +000012042$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012043
Guido van Rossum627b2d71993-12-24 10:39:16 +000012044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012046
Guido van Rossum627b2d71993-12-24 10:39:16 +000012047fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012048done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012049
Jack Jansen150753c2003-03-29 22:07:47 +000012050for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012051do :
12052 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012053if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012054 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012055#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012058/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012059#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012060int
12061main ()
12062{
12063setpgrp(0,0);
12064 ;
12065 return 0;
12066}
12067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012069
Matthias Kloseb9621712010-04-24 17:59:49 +000012070$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012071
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012074
12075fi
12076done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012077
Thomas Wouters3a584202000-08-05 23:28:51 +000012078for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012079do :
12080 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012081if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012082 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012083#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012086/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012087#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012088int
12089main ()
12090{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012091gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012092 ;
12093 return 0;
12094}
12095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012096if ac_fn_c_try_compile "$LINENO"; then :
12097
Guido van Rossum627b2d71993-12-24 10:39:16 +000012098else
Skip Montanaro6dead952003-09-25 14:50:04 +000012099
Matthias Kloseb9621712010-04-24 17:59:49 +000012100$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012101
Martin v. Löwis11437992002-04-12 09:54:03 +000012102
Guido van Rossum627b2d71993-12-24 10:39:16 +000012103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012105
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012106fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012107done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108
Michael W. Hudson54241132001-12-07 15:38:26 +000012109
Victor Stinnere0be4232011-10-25 13:06:09 +020012110for ac_func in clock_gettime
12111do :
12112 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12113if test "x$ac_cv_func_clock_gettime" = xyes; then :
12114 cat >>confdefs.h <<_ACEOF
12115#define HAVE_CLOCK_GETTIME 1
12116_ACEOF
12117
12118else
12119
12120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12121$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12122if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12123 $as_echo_n "(cached) " >&6
12124else
12125 ac_check_lib_save_LIBS=$LIBS
12126LIBS="-lrt $LIBS"
12127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12128/* end confdefs.h. */
12129
12130/* Override any GCC internal prototype to avoid an error.
12131 Use char because int might match the return type of a GCC
12132 builtin and then its argument prototype would still apply. */
12133#ifdef __cplusplus
12134extern "C"
12135#endif
12136char clock_gettime ();
12137int
12138main ()
12139{
12140return clock_gettime ();
12141 ;
12142 return 0;
12143}
12144_ACEOF
12145if ac_fn_c_try_link "$LINENO"; then :
12146 ac_cv_lib_rt_clock_gettime=yes
12147else
12148 ac_cv_lib_rt_clock_gettime=no
12149fi
12150rm -f core conftest.err conftest.$ac_objext \
12151 conftest$ac_exeext conftest.$ac_ext
12152LIBS=$ac_check_lib_save_LIBS
12153fi
12154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12155$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12156if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12157
Victor Stinner7efb8332014-08-29 15:41:08 +020012158 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012159 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12160
12161
12162$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12163
12164
12165fi
12166
12167
12168fi
12169done
12170
12171
12172for ac_func in clock_getres
12173do :
12174 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12175if test "x$ac_cv_func_clock_getres" = xyes; then :
12176 cat >>confdefs.h <<_ACEOF
12177#define HAVE_CLOCK_GETRES 1
12178_ACEOF
12179
12180else
12181
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12183$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12184if ${ac_cv_lib_rt_clock_getres+:} false; then :
12185 $as_echo_n "(cached) " >&6
12186else
12187 ac_check_lib_save_LIBS=$LIBS
12188LIBS="-lrt $LIBS"
12189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190/* end confdefs.h. */
12191
12192/* Override any GCC internal prototype to avoid an error.
12193 Use char because int might match the return type of a GCC
12194 builtin and then its argument prototype would still apply. */
12195#ifdef __cplusplus
12196extern "C"
12197#endif
12198char clock_getres ();
12199int
12200main ()
12201{
12202return clock_getres ();
12203 ;
12204 return 0;
12205}
12206_ACEOF
12207if ac_fn_c_try_link "$LINENO"; then :
12208 ac_cv_lib_rt_clock_getres=yes
12209else
12210 ac_cv_lib_rt_clock_getres=no
12211fi
12212rm -f core conftest.err conftest.$ac_objext \
12213 conftest$ac_exeext conftest.$ac_ext
12214LIBS=$ac_check_lib_save_LIBS
12215fi
12216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12217$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12218if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12219
12220 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12221
12222
12223fi
12224
12225
12226fi
12227done
12228
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12231$as_echo_n "checking for major... " >&6; }
12232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012233/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012234
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012235#if defined(MAJOR_IN_MKDEV)
12236#include <sys/mkdev.h>
12237#elif defined(MAJOR_IN_SYSMACROS)
12238#include <sys/sysmacros.h>
12239#else
12240#include <sys/types.h>
12241#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012242
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012243int
12244main ()
12245{
12246
12247 makedev(major(0),minor(0));
12248
12249 ;
12250 return 0;
12251}
12252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012253if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012254
12255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012257
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12259$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012260
12261else
Skip Montanaro6dead952003-09-25 14:50:04 +000012262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12264$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012265
12266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012267rm -f core conftest.err conftest.$ac_objext \
12268 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012269
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012270# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012271# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12273$as_echo_n "checking for getaddrinfo... " >&6; }
12274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012275/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012276
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012277#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012278#include <sys/socket.h>
12279#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012280#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012281
Martin v. Löwis11437992002-04-12 09:54:03 +000012282int
12283main ()
12284{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012285getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 ;
12287 return 0;
12288}
12289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012290if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012291 have_getaddrinfo=yes
12292else
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012295rm -f core conftest.err conftest.$ac_objext \
12296 conftest$ac_exeext conftest.$ac_ext
12297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12298$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012299if test $have_getaddrinfo = yes
12300then
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12302$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012303 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012305else
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012307
12308if test "${enable_ipv6+set}" = set; then
12309 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12310else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012311 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012312fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012316
Stefan Krah19c21392012-11-22 23:47:32 +010012317#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012318#include <sys/types.h>
12319#include <netdb.h>
12320#include <string.h>
12321#include <sys/socket.h>
12322#include <netinet/in.h>
12323
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012324int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325{
12326 int passive, gaierr, inet4 = 0, inet6 = 0;
12327 struct addrinfo hints, *ai, *aitop;
12328 char straddr[INET6_ADDRSTRLEN], strport[16];
12329
12330 for (passive = 0; passive <= 1; passive++) {
12331 memset(&hints, 0, sizeof(hints));
12332 hints.ai_family = AF_UNSPEC;
12333 hints.ai_flags = passive ? AI_PASSIVE : 0;
12334 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012335 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012336 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12337 (void)gai_strerror(gaierr);
12338 goto bad;
12339 }
12340 for (ai = aitop; ai; ai = ai->ai_next) {
12341 if (ai->ai_addr == NULL ||
12342 ai->ai_addrlen == 0 ||
12343 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12344 straddr, sizeof(straddr), strport, sizeof(strport),
12345 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12346 goto bad;
12347 }
12348 switch (ai->ai_family) {
12349 case AF_INET:
12350 if (strcmp(strport, "54321") != 0) {
12351 goto bad;
12352 }
12353 if (passive) {
12354 if (strcmp(straddr, "0.0.0.0") != 0) {
12355 goto bad;
12356 }
12357 } else {
12358 if (strcmp(straddr, "127.0.0.1") != 0) {
12359 goto bad;
12360 }
12361 }
12362 inet4++;
12363 break;
12364 case AF_INET6:
12365 if (strcmp(strport, "54321") != 0) {
12366 goto bad;
12367 }
12368 if (passive) {
12369 if (strcmp(straddr, "::") != 0) {
12370 goto bad;
12371 }
12372 } else {
12373 if (strcmp(straddr, "::1") != 0) {
12374 goto bad;
12375 }
12376 }
12377 inet6++;
12378 break;
12379 case AF_UNSPEC:
12380 goto bad;
12381 break;
12382 default:
12383 /* another family support? */
12384 break;
12385 }
12386 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012387 freeaddrinfo(aitop);
12388 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012389 }
12390
12391 if (!(inet4 == 0 || inet4 == 2))
12392 goto bad;
12393 if (!(inet6 == 0 || inet6 == 2))
12394 goto bad;
12395
12396 if (aitop)
12397 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012398 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012399
12400 bad:
12401 if (aitop)
12402 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012403 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012404}
12405
Martin v. Löwis11437992002-04-12 09:54:03 +000012406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012407if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012408 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012416fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012417
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12421$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12422
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012423if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012424then
12425 if test $ipv6 = yes
12426 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012427 echo 'Fatal: You must get working getaddrinfo() function.'
12428 echo ' or you can specify "--disable-ipv6"'.
12429 exit 1
12430 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012431else
Martin v. Löwis11437992002-04-12 09:54:03 +000012432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012434
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012435fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012436
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012437for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012438do :
12439 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012440if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012443_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012444
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012445fi
12446done
12447
Michael W. Hudson54241132001-12-07 15:38:26 +000012448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12451$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012452if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012456/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012457#include <sys/types.h>
12458#include <sys/time.h>
12459#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Martin v. Löwis11437992002-04-12 09:54:03 +000012461int
12462main ()
12463{
12464if ((struct tm *) 0)
12465return 0;
12466 ;
12467 return 0;
12468}
12469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012470if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012471 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012472else
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12478$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012479if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482
12483fi
12484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12486$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012487if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489else
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492#include <sys/types.h>
12493#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012494
Martin v. Löwis11437992002-04-12 09:54:03 +000012495int
12496main ()
12497{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498struct tm tm;
12499 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 ;
12502 return 0;
12503}
12504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012505if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012506 ac_cv_struct_tm=time.h
12507else
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12513$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012514if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012515
Matthias Kloseb9621712010-04-24 17:59:49 +000012516$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012517
12518fi
12519
Matthias Kloseb9621712010-04-24 17:59:49 +000012520ac_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 +000012521#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012522
Matthias Kloseb9621712010-04-24 17:59:49 +000012523"
Victor Stinnere0be4232011-10-25 13:06:09 +020012524if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
12526cat >>confdefs.h <<_ACEOF
12527#define HAVE_STRUCT_TM_TM_ZONE 1
12528_ACEOF
12529
12530
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012531fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012532
Martin v. Löwis11437992002-04-12 09:54:03 +000012533if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536
12537else
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12539"
Victor Stinnere0be4232011-10-25 13:06:09 +020012540if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542else
Matthias Kloseb9621712010-04-24 17:59:49 +000012543 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544fi
12545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012546cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012547#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548_ACEOF
12549
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12551$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012552if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012554else
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012556/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012557#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558#if !HAVE_DECL_TZNAME
12559extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Martin v. Löwis11437992002-04-12 09:54:03 +000012562int
12563main ()
12564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 ;
12567 return 0;
12568}
12569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012570if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012571 ac_cv_var_tzname=yes
12572else
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012575rm -f core conftest.err conftest.$ac_objext \
12576 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12579$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012580 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012581
Matthias Kloseb9621712010-04-24 17:59:49 +000012582$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012583
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012584 fi
12585fi
12586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587ac_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 +020012588if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012589
12590cat >>confdefs.h <<_ACEOF
12591#define HAVE_STRUCT_STAT_ST_RDEV 1
12592_ACEOF
12593
12594
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012595fi
12596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597ac_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 +020012598if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012599
Martin v. Löwis11437992002-04-12 09:54:03 +000012600cat >>confdefs.h <<_ACEOF
12601#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12602_ACEOF
12603
12604
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012605fi
12606
Matthias Kloseb9621712010-04-24 17:59:49 +000012607ac_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 +020012608if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012609
12610cat >>confdefs.h <<_ACEOF
12611#define HAVE_STRUCT_STAT_ST_FLAGS 1
12612_ACEOF
12613
12614
12615fi
12616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617ac_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 +020012618if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012619
12620cat >>confdefs.h <<_ACEOF
12621#define HAVE_STRUCT_STAT_ST_GEN 1
12622_ACEOF
12623
12624
12625fi
12626
Matthias Kloseb9621712010-04-24 17:59:49 +000012627ac_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 +020012628if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012629
12630cat >>confdefs.h <<_ACEOF
12631#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12632_ACEOF
12633
12634
12635fi
12636
Matthias Kloseb9621712010-04-24 17:59:49 +000012637ac_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 +020012638if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012639
Martin v. Löwis11437992002-04-12 09:54:03 +000012640cat >>confdefs.h <<_ACEOF
12641#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12642_ACEOF
12643
12644
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012645fi
12646
Stefan Krah267b6392016-04-26 01:09:18 +020012647ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12648 #include <sys/types.h>
12649 #include <pwd.h>
12650
12651"
12652if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12653
12654cat >>confdefs.h <<_ACEOF
12655#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12656_ACEOF
12657
12658
12659fi
12660ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12661 #include <sys/types.h>
12662 #include <pwd.h>
12663
12664"
12665if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12666
12667cat >>confdefs.h <<_ACEOF
12668#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12669_ACEOF
12670
12671
12672fi
12673
Michael W. Hudson54241132001-12-07 15:38:26 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12676$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012677if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012678 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679else
Matthias Kloseb159a552010-04-25 21:00:44 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012683#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012684int
12685main ()
12686{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012687return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012693 ac_cv_header_time_altzone=yes
12694else
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699fi
12700
Matthias Kloseb9621712010-04-24 17:59:49 +000012701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12702$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012704
Matthias Kloseb9621712010-04-24 17:59:49 +000012705$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706
12707fi
12708
Guido van Rossumda88dad1995-01-26 00:46:29 +000012709was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12711$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012714
12715#include <sys/types.h>
12716#include <sys/select.h>
12717#include <sys/time.h>
12718
Martin v. Löwis11437992002-04-12 09:54:03 +000012719int
12720main ()
12721{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722;
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ;
12724 return 0;
12725}
12726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
12729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012732 was_it_defined=yes
12733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12737$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738
Matthias Kloseb9621712010-04-24 17:59:49 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12740$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012741if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012743else
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012745/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012746#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012747int
12748main ()
12749{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012750struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ;
12752 return 0;
12753}
12754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012756 ac_cv_struct_addrinfo=yes
12757else
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12761fi
12762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12764$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012765if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012768
12769fi
12770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12772$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012773if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012774 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012775else
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012777/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012778
12779# include <sys/types.h>
12780# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012781int
12782main ()
12783{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012784struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 ;
12786 return 0;
12787}
12788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012790 ac_cv_struct_sockaddr_storage=yes
12791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12795fi
12796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12798$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012799if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012802
12803fi
12804
Christian Heimesdffa3942016-09-05 23:54:41 +020012805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12806$as_echo_n "checking for sockaddr_alg... " >&6; }
12807if ${ac_cv_struct_sockaddr_alg+:} false; then :
12808 $as_echo_n "(cached) " >&6
12809else
12810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12811/* end confdefs.h. */
12812
12813# include <sys/types.h>
12814# include <sys/socket.h>
12815# include <linux/if_alg.h>
12816int
12817main ()
12818{
12819struct sockaddr_alg s
12820 ;
12821 return 0;
12822}
12823_ACEOF
12824if ac_fn_c_try_compile "$LINENO"; then :
12825 ac_cv_struct_sockaddr_alg=yes
12826else
12827 ac_cv_struct_sockaddr_alg=no
12828fi
12829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12830fi
12831
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12833$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12834if test $ac_cv_struct_sockaddr_alg = yes; then
12835
12836$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12837
12838fi
12839
Guido van Rossum627b2d71993-12-24 10:39:16 +000012840# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12843$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012844if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012846else
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012849$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012850int
12851main ()
12852{
12853static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012854test_array [0] = 0;
12855return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
12857 ;
12858 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012859}
Martin v. Löwis11437992002-04-12 09:54:03 +000012860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012861if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012862 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012863else
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12869$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012872
12873fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12876$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012877if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012879else
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012881/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
12885{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012886
Martin v. Löwis11437992002-04-12 09:54:03 +000012887#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012888 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012890 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 char const *const *pcpcc;
12893 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 /* NEC SVR4.0.2 mips cc rejects this. */
12895 struct point {int x, y;};
12896 static struct point const zero = {0,0};
12897 /* AIX XL C 1.02.0.0 rejects this.
12898 It does not let you subtract one const X* pointer from another in
12899 an arm of an if-expression whose if-part is not a constant
12900 expression */
12901 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 ++pcpcc;
12905 ppc = (char**) pcpcc;
12906 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012907 { /* SCO 3.2v4 cc rejects this sort of thing. */
12908 char tx;
12909 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012911
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 }
12915 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12916 int x[] = {25, 17};
12917 const int *foo = &x[0];
12918 ++foo;
12919 }
12920 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12921 typedef const int *iptr;
12922 iptr p = 0;
12923 ++p;
12924 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012925 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012927 struct s { int j; const int *ap[3]; } bx;
12928 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 }
12930 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12931 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012935#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012936
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 ;
12938 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012939}
Martin v. Löwis11437992002-04-12 09:54:03 +000012940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012941if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012942 ac_cv_c_const=yes
12943else
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12949$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953
12954fi
12955
Michael W. Hudson54241132001-12-07 15:38:26 +000012956
Guido van Rossumda88dad1995-01-26 00:46:29 +000012957works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12959$as_echo_n "checking for working volatile... " >&6; }
12960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012961/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012962
Martin v. Löwis11437992002-04-12 09:54:03 +000012963int
12964main ()
12965{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 ;
12968 return 0;
12969}
12970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012971if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012972 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012973else
Skip Montanaro6dead952003-09-25 14:50:04 +000012974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012976
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012977
Guido van Rossum627b2d71993-12-24 10:39:16 +000012978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12981$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012982
Guido van Rossumda88dad1995-01-26 00:46:29 +000012983works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12985$as_echo_n "checking for working signed char... " >&6; }
12986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012987/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012988
Martin v. Löwis11437992002-04-12 09:54:03 +000012989int
12990main ()
12991{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012992signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 ;
12994 return 0;
12995}
12996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012997if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012998 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012999else
Skip Montanaro6dead952003-09-25 14:50:04 +000013000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013002
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013003
Guido van Rossum7f43da71994-08-01 12:15:30 +000013004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13007$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013008
Guido van Rossumda88dad1995-01-26 00:46:29 +000013009have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13011$as_echo_n "checking for prototypes... " >&6; }
13012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013013/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013014int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013015int
13016main ()
13017{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013018return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 ;
13020 return 0;
13021}
13022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013023if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013026
Matthias Kloseb159a552010-04-25 21:00:44 +000013027 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13031$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032
Guido van Rossumda88dad1995-01-26 00:46:29 +000013033works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13035$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013037/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013038
13039#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013040int foo(int x, ...) {
13041 va_list va;
13042 va_start(va, x);
13043 va_arg(va, int);
13044 va_arg(va, char *);
13045 va_arg(va, double);
13046 return 0;
13047}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049int
13050main ()
13051{
Guido van Rossum90eea071996-08-30 20:58:57 +000013052return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 ;
13054 return 0;
13055}
13056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013058
13059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013061
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013062 works=yes
13063
Guido van Rossum627b2d71993-12-24 10:39:16 +000013064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13067$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068
Martin v. Löwisd6320502004-08-12 13:45:08 +000013069# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13071$as_echo_n "checking for socketpair... " >&6; }
13072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013073/* end confdefs.h. */
13074
13075#include <sys/types.h>
13076#include <sys/socket.h>
13077
13078int
13079main ()
13080{
13081void *x=socketpair
13082 ;
13083 return 0;
13084}
13085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013086if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013089
Matthias Kloseb159a552010-04-25 21:00:44 +000013090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013091$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013092else
Matthias Kloseb9621712010-04-24 17:59:49 +000013093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13094$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013095
13096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013098
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013099# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13101$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013103/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013104#include <sys/types.h>
13105#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013106int
13107main ()
13108{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013109struct sockaddr x;
13110x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 ;
13112 return 0;
13113}
13114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013115if ac_fn_c_try_compile "$LINENO"; then :
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13117$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120
13121else
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13123$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013124
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013127
Guido van Rossumda88dad1995-01-26 00:46:29 +000013128va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13130$as_echo_n "checking whether va_list is an array... " >&6; }
13131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013132/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133
13134#ifdef HAVE_STDARG_PROTOTYPES
13135#include <stdarg.h>
13136#else
13137#include <varargs.h>
13138#endif
13139
Martin v. Löwis11437992002-04-12 09:54:03 +000013140int
13141main ()
13142{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013143va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 ;
13145 return 0;
13146}
13147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013148if ac_fn_c_try_compile "$LINENO"; then :
13149
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013150else
Skip Montanaro6dead952003-09-25 14:50:04 +000013151
Martin v. Löwis11437992002-04-12 09:54:03 +000013152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Guido van Rossumda88dad1995-01-26 00:46:29 +000013155 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013156
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13160$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013161
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013162# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013163
13164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013166if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13171$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013172 OLD_CFLAGS=$CFLAGS
13173 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013175/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013176
13177# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013178
Martin v. Löwis11437992002-04-12 09:54:03 +000013179int
13180main ()
13181{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013182
13183 char *name;
13184 struct hostent *he, *res;
13185 char buffer[2048];
13186 int buflen = 2048;
13187 int h_errnop;
13188
13189 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013190
13191 ;
13192 return 0;
13193}
13194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013196
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013198
Martin v. Löwis11437992002-04-12 09:54:03 +000013199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13203$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013204
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013205else
Skip Montanaro6dead952003-09-25 14:50:04 +000013206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13208$as_echo "no" >&6; }
13209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13210$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013212/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013213
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013214# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
Martin v. Löwis11437992002-04-12 09:54:03 +000013216int
13217main ()
13218{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013219
13220 char *name;
13221 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013222 char buffer[2048];
13223 int buflen = 2048;
13224 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013225
Matthias Kloseb159a552010-04-25 21:00:44 +000013226 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013227
13228 ;
13229 return 0;
13230}
13231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013232if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013235
Martin v. Löwis11437992002-04-12 09:54:03 +000013236
Matthias Kloseb159a552010-04-25 21:00:44 +000013237$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013238
Matthias Kloseb9621712010-04-24 17:59:49 +000013239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13240$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013241
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013242else
Skip Montanaro6dead952003-09-25 14:50:04 +000013243
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13245$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13247$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13249/* end confdefs.h. */
13250
13251# include <netdb.h>
13252
13253int
13254main ()
13255{
13256
13257 char *name;
13258 struct hostent *he;
13259 struct hostent_data data;
13260
13261 (void) gethostbyname_r(name, he, &data);
13262
13263 ;
13264 return 0;
13265}
13266_ACEOF
13267if ac_fn_c_try_compile "$LINENO"; then :
13268
13269 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13270
13271
13272$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13273
13274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13275$as_echo "yes" >&6; }
13276
13277else
13278
13279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13280$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013281
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013290 CFLAGS=$OLD_CFLAGS
13291
13292else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 for ac_func in gethostbyname
13295do :
13296 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013297if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013300_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013301
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013302fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013303done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013304
Michael W. Hudson54241132001-12-07 15:38:26 +000013305
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013306fi
13307
Michael W. Hudson54241132001-12-07 15:38:26 +000013308
13309
13310
13311
13312
13313
Guido van Rossum627b2d71993-12-24 10:39:16 +000013314# checks for system services
13315# (none yet)
13316
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013318ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013319if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013320
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013321else
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13323$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013324if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326else
Martin v. Löwis11437992002-04-12 09:54:03 +000013327 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013328LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332/* Override any GCC internal prototype to avoid an error.
13333 Use char because int might match the return type of a GCC
13334 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013335#ifdef __cplusplus
13336extern "C"
13337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013338char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013339int
13340main ()
13341{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 ;
13344 return 0;
13345}
13346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013347if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013349else
Matthias Kloseb9621712010-04-24 17:59:49 +000013350 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013352rm -f core conftest.err conftest.$ac_objext \
13353 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013354LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13357$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013358if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 cat >>confdefs.h <<_ACEOF
13360#define HAVE_LIBIEEE 1
13361_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013363 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013364
Guido van Rossum627b2d71993-12-24 10:39:16 +000013365fi
13366
Michael W. Hudson54241132001-12-07 15:38:26 +000013367
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013368fi
13369
Michael W. Hudson54241132001-12-07 15:38:26 +000013370
Guido van Rossum7f253911997-05-09 02:42:48 +000013371# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13373$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013376if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013378if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013379then
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13384$as_echo "yes" >&6; }
13385else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13386$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013387fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13390$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391fi
13392
Guido van Rossum7f253911997-05-09 02:42:48 +000013393
Guido van Rossum7f43da71994-08-01 12:15:30 +000013394# check for --with-libm=...
13395
Guido van Rossum563e7081996-09-10 18:20:48 +000013396case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013397Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013398*) LIBM=-lm
13399esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13401$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013404if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013406if test "$withval" = no
13407then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13409$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013410elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013411then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13413$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013414else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013415fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13418$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419fi
13420
Guido van Rossum7f43da71994-08-01 12:15:30 +000013421
13422# check for --with-libc=...
13423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13425$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013428if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013429 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013430if test "$withval" = no
13431then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13433$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013434elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013435then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13437$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013438else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013439fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013440else
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13442$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013443fi
13444
Guido van Rossum7f43da71994-08-01 12:15:30 +000013445
Stefan Krah1919b7e2012-03-21 18:25:23 +010013446# **************************************
13447# * Check for gcc x64 inline assembler *
13448# **************************************
13449
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13451$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13453/* end confdefs.h. */
13454
13455int
13456main ()
13457{
13458
13459 __asm__ __volatile__ ("movq %rcx, %rax");
13460
13461 ;
13462 return 0;
13463}
13464_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013465if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013466 have_gcc_asm_for_x64=yes
13467else
13468 have_gcc_asm_for_x64=no
13469fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013470rm -f core conftest.err conftest.$ac_objext \
13471 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13473$as_echo "$have_gcc_asm_for_x64" >&6; }
13474if test "$have_gcc_asm_for_x64" = yes
13475then
13476
13477$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13478
13479fi
13480
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013481# **************************************************
13482# * Check for various properties of floating point *
13483# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13486$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013487if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013489else
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013492 ac_cv_little_endian_double=no
13493else
Matthias Kloseb9621712010-04-24 17:59:49 +000013494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013495/* end confdefs.h. */
13496
13497#include <string.h>
13498int main() {
13499 double x = 9006104071832581.0;
13500 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13501 return 0;
13502 else
13503 return 1;
13504}
13505
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013508 ac_cv_little_endian_double=yes
13509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013514fi
13515
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013516fi
13517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13519$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013520if test "$ac_cv_little_endian_double" = yes
13521then
13522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013524
13525fi
13526
Matthias Kloseb9621712010-04-24 17:59:49 +000013527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13528$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013529if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013531else
13532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013534 ac_cv_big_endian_double=no
13535else
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013537/* end confdefs.h. */
13538
13539#include <string.h>
13540int main() {
13541 double x = 9006104071832581.0;
13542 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13543 return 0;
13544 else
13545 return 1;
13546}
13547
13548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013549if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013550 ac_cv_big_endian_double=yes
13551else
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013556fi
13557
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013558fi
13559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13561$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013562if test "$ac_cv_big_endian_double" = yes
13563then
13564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013566
13567fi
13568
13569# Some ARM platforms use a mixed-endian representation for doubles.
13570# While Python doesn't currently have full support for these platforms
13571# (see e.g., issue 1762561), we can at least make sure that float <-> string
13572# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13574$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013575if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013577else
13578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013580 ac_cv_mixed_endian_double=no
13581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013583/* end confdefs.h. */
13584
13585#include <string.h>
13586int main() {
13587 double x = 9006104071832581.0;
13588 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13589 return 0;
13590 else
13591 return 1;
13592}
13593
13594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013595if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013596 ac_cv_mixed_endian_double=yes
13597else
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13601 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013602fi
13603
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013604fi
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13607$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013608if test "$ac_cv_mixed_endian_double" = yes
13609then
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013612
13613fi
13614
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013615# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013616# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013617# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013618# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013619# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013620# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013621
13622# This inline assembler syntax may also work for suncc and icc,
13623# so we try it on all platforms.
13624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13626$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013628/* end confdefs.h. */
13629
13630int
13631main ()
13632{
13633
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013634 unsigned short cw;
13635 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13636 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013637
13638 ;
13639 return 0;
13640}
13641_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013642if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013643 have_gcc_asm_for_x87=yes
13644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013646fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013647rm -f core conftest.err conftest.$ac_objext \
13648 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13650$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013651if test "$have_gcc_asm_for_x87" = yes
13652then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013655
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013657
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13659$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13661/* end confdefs.h. */
13662
13663int
13664main ()
13665{
13666
13667 unsigned int fpcr;
13668 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13669 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13670
13671 ;
13672 return 0;
13673}
13674_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013675if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013676 have_gcc_asm_for_mc68881=yes
13677else
13678 have_gcc_asm_for_mc68881=no
13679fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013680rm -f core conftest.err conftest.$ac_objext \
13681 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13683$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13684if test "$have_gcc_asm_for_mc68881" = yes
13685then
13686
13687$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13688
13689fi
13690
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013691# Detect whether system arithmetic is subject to x87-style double
13692# rounding issues. The result of this test has little meaning on non
13693# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13694# mode is round-to-nearest and double rounding issues are present, and
13695# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13697$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013698# $BASECFLAGS may affect the result
13699ac_save_cc="$CC"
13700CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013702 ac_cv_x87_double_rounding=no
13703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013705/* end confdefs.h. */
13706
13707#include <stdlib.h>
13708#include <math.h>
13709int main() {
13710 volatile double x, y, z;
13711 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13712 x = 0.99999999999999989; /* 1-2**-53 */
13713 y = 1./x;
13714 if (y != 1.)
13715 exit(0);
13716 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13717 x = 1e16;
13718 y = 2.99999;
13719 z = x + y;
13720 if (z != 1e16+4.)
13721 exit(0);
13722 /* both tests show evidence of double rounding */
13723 exit(1);
13724}
13725
13726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013727if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013728 ac_cv_x87_double_rounding=no
13729else
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013734fi
13735
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013736CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13738$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013739if test "$ac_cv_x87_double_rounding" = yes
13740then
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013743
13744fi
13745
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013746# ************************************
13747# * Check for mathematical functions *
13748# ************************************
13749
13750LIBS_SAVE=$LIBS
13751LIBS="$LIBS $LIBM"
13752
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013753for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13754do :
13755 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13756ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013757if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013758 cat >>confdefs.h <<_ACEOF
13759#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13760_ACEOF
13761
13762fi
13763done
13764
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013765for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013766do :
13767 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13768ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013769if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013770 cat >>confdefs.h <<_ACEOF
13771#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13772_ACEOF
13773
13774fi
13775done
13776
13777ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13778"
Victor Stinnere0be4232011-10-25 13:06:09 +020013779if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013780 ac_have_decl=1
13781else
13782 ac_have_decl=0
13783fi
13784
13785cat >>confdefs.h <<_ACEOF
13786#define HAVE_DECL_ISINF $ac_have_decl
13787_ACEOF
13788ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13789"
Victor Stinnere0be4232011-10-25 13:06:09 +020013790if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013791 ac_have_decl=1
13792else
13793 ac_have_decl=0
13794fi
13795
13796cat >>confdefs.h <<_ACEOF
13797#define HAVE_DECL_ISNAN $ac_have_decl
13798_ACEOF
13799ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13800"
Victor Stinnere0be4232011-10-25 13:06:09 +020013801if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013802 ac_have_decl=1
13803else
13804 ac_have_decl=0
13805fi
13806
13807cat >>confdefs.h <<_ACEOF
13808#define HAVE_DECL_ISFINITE $ac_have_decl
13809_ACEOF
13810
13811
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013812# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13813# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13815$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013816if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013818else
13819
Matthias Kloseb9621712010-04-24 17:59:49 +000013820if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013821 ac_cv_tanh_preserves_zero_sign=no
13822else
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013824/* end confdefs.h. */
13825
13826#include <math.h>
13827#include <stdlib.h>
13828int main() {
13829 /* return 0 if either negative zeros don't exist
13830 on this platform or if negative zeros exist
13831 and tanh(-0.) == -0. */
13832 if (atan2(0., -1.) == atan2(-0., -1.) ||
13833 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13834 else exit(1);
13835}
13836
13837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013839 ac_cv_tanh_preserves_zero_sign=yes
13840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013845fi
13846
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013847fi
13848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13850$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013851if test "$ac_cv_tanh_preserves_zero_sign" = yes
13852then
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013855
13856fi
13857
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013858if test "$ac_cv_func_log1p" = yes
13859then
13860 # On some versions of AIX, log1p(-0.) returns 0. instead of
13861 # -0. See issue #9920.
13862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13863$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013864 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013865 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013866else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013867
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013868 if test "$cross_compiling" = yes; then :
13869 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013870else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13872/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013873
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013874 #include <math.h>
13875 #include <stdlib.h>
13876 int main() {
13877 /* Fail if the signs of log1p(-0.) and -0. can be
13878 distinguished. */
13879 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13880 return 0;
13881 else
13882 return 1;
13883 }
13884
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013885_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013886if ac_fn_c_try_run "$LINENO"; then :
13887 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013888else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013889 ac_cv_log1p_drops_zero_sign=yes
13890fi
13891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013893fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013894
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013895fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013896
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13898$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13899fi
13900if test "$ac_cv_log1p_drops_zero_sign" = yes
13901then
13902
13903$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13904
13905fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013906
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013907LIBS=$LIBS_SAVE
13908
Mark Dickinsona614f042009-11-28 12:48:43 +000013909# For multiprocessing module, check that sem_open
13910# actually works. For FreeBSD versions <= 7.2,
13911# the kernel module that provides POSIX semaphores
13912# isn't loaded by default, so an attempt to call
13913# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13915$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013916if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013918else
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013920 ac_cv_posix_semaphores_enabled=yes
13921else
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013923/* end confdefs.h. */
13924
13925#include <unistd.h>
13926#include <fcntl.h>
13927#include <stdio.h>
13928#include <semaphore.h>
13929#include <sys/stat.h>
13930
13931int main(void) {
13932 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13933 if (a == SEM_FAILED) {
13934 perror("sem_open");
13935 return 1;
13936 }
13937 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013938 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013939 return 0;
13940}
13941
13942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013943if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013944 ac_cv_posix_semaphores_enabled=yes
13945else
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013950fi
13951
13952
Mark Dickinsona614f042009-11-28 12:48:43 +000013953fi
13954
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13956$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013957if test $ac_cv_posix_semaphores_enabled = no
13958then
13959
Matthias Kloseb9621712010-04-24 17:59:49 +000013960$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013961
13962fi
13963
Mark Dickinson10683072009-04-18 21:18:19 +000013964# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13966$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013967if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013971 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013972else
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013974/* end confdefs.h. */
13975
13976#include <unistd.h>
13977#include <fcntl.h>
13978#include <stdio.h>
13979#include <semaphore.h>
13980#include <sys/stat.h>
13981
13982int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013983 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013984 int count;
13985 int res;
13986 if(a==SEM_FAILED){
13987 perror("sem_open");
13988 return 1;
13989
13990 }
13991 res = sem_getvalue(a, &count);
13992 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013993 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013994 return res==-1 ? 1 : 0;
13995}
13996
Mark Dickinson10683072009-04-18 21:18:19 +000013997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013998if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013999 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014000else
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014005fi
14006
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014007
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014008fi
14009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14011$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014012if test $ac_cv_broken_sem_getvalue = yes
14013then
14014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014016
14017fi
14018
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014019ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14020"
14021if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14022 ac_have_decl=1
14023else
14024 ac_have_decl=0
14025fi
14026
14027cat >>confdefs.h <<_ACEOF
14028#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14029_ACEOF
14030ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14031"
14032if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14033 ac_have_decl=1
14034else
14035 ac_have_decl=0
14036fi
14037
14038cat >>confdefs.h <<_ACEOF
14039#define HAVE_DECL_RTLD_NOW $ac_have_decl
14040_ACEOF
14041ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14042"
14043if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14044 ac_have_decl=1
14045else
14046 ac_have_decl=0
14047fi
14048
14049cat >>confdefs.h <<_ACEOF
14050#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14051_ACEOF
14052ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14053"
14054if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14055 ac_have_decl=1
14056else
14057 ac_have_decl=0
14058fi
14059
14060cat >>confdefs.h <<_ACEOF
14061#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14062_ACEOF
14063ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14064"
14065if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14066 ac_have_decl=1
14067else
14068 ac_have_decl=0
14069fi
14070
14071cat >>confdefs.h <<_ACEOF
14072#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14073_ACEOF
14074ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14075"
14076if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14077 ac_have_decl=1
14078else
14079 ac_have_decl=0
14080fi
14081
14082cat >>confdefs.h <<_ACEOF
14083#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14084_ACEOF
14085ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14086"
14087if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14088 ac_have_decl=1
14089else
14090 ac_have_decl=0
14091fi
14092
14093cat >>confdefs.h <<_ACEOF
14094#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14095_ACEOF
14096
14097
Mark Dickinsonbd792642009-03-18 20:06:12 +000014098# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14100$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014101# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014102if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014103 enableval=$enable_big_digits; case $enable_big_digits in
14104yes)
14105 enable_big_digits=30 ;;
14106no)
14107 enable_big_digits=15 ;;
1410815|30)
14109 ;;
14110*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014111 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 +000014112esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14114$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014115
14116cat >>confdefs.h <<_ACEOF
14117#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14118_ACEOF
14119
14120
14121else
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14123$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014124fi
14125
14126
Guido van Rossumef2255b2000-03-10 22:30:29 +000014127# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014128ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014129if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014130
14131
Matthias Kloseb9621712010-04-24 17:59:49 +000014132$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014134 wchar_h="yes"
14135
Guido van Rossumef2255b2000-03-10 22:30:29 +000014136else
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014138
14139fi
14140
Michael W. Hudson54241132001-12-07 15:38:26 +000014141
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014143# determine wchar_t size
14144if test "$wchar_h" = yes
14145then
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14149# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14151$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014152if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014154else
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14156"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014157
Martin v. Löwis11437992002-04-12 09:54:03 +000014158else
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 if test "$ac_cv_type_wchar_t" = yes; then
14160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014162as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014163See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014164 else
14165 ac_cv_sizeof_wchar_t=0
14166 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14171$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014172
14173
14174
Martin v. Löwis11437992002-04-12 09:54:03 +000014175cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014176#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014177_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014178
Michael W. Hudson54241132001-12-07 15:38:26 +000014179
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014180fi
14181
Matthias Kloseb9621712010-04-24 17:59:49 +000014182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14183$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014184have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014186/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014187
14188#include <tcl.h>
14189#if TCL_UTF_MAX != 6
14190# error "NOT UCS4_TCL"
14191#endif
14192int
14193main ()
14194{
14195
14196 ;
14197 return 0;
14198}
14199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014201
14202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014204
14205 have_ucs4_tcl=yes
14206
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14210$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014211
Skip Montanaro6dead952003-09-25 14:50:04 +000014212# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014213if test "$wchar_h" = yes
14214then
14215 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14217$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014218 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014220else
14221
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 if test "$cross_compiling" = yes; 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014226/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014227
14228 #include <wchar.h>
14229 int main()
14230 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014231 /* Success: exit code 0 */
14232 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014233 }
14234
14235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014236if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014237 ac_cv_wchar_t_signed=yes
14238else
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14242 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014243fi
14244
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014245fi
14246
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14248$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249fi
14250
Georg Brandl52d168a2008-01-07 18:10:24 +000014251# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014252if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014253 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014254then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014255 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014258
Georg Brandl52d168a2008-01-07 18:10:24 +000014259else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014260 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014261fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14263$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014264
14265# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14267$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014268if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014270else
Matthias Kloseb9621712010-04-24 17:59:49 +000014271 ac_cv_c_bigendian=unknown
14272 # See if we're dealing with a universal compiler.
14273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14274/* end confdefs.h. */
14275#ifndef __APPLE_CC__
14276 not a universal capable compiler
14277 #endif
14278 typedef int dummy;
14279
Skip Montanaro6dead952003-09-25 14:50:04 +000014280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014281if ac_fn_c_try_compile "$LINENO"; then :
14282
14283 # Check for potential -arch flags. It is not universal unless
14284 # there are at least two -arch flags with different values.
14285 ac_arch=
14286 ac_prev=
14287 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14288 if test -n "$ac_prev"; then
14289 case $ac_word in
14290 i?86 | x86_64 | ppc | ppc64)
14291 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14292 ac_arch=$ac_word
14293 else
14294 ac_cv_c_bigendian=universal
14295 break
14296 fi
14297 ;;
14298 esac
14299 ac_prev=
14300 elif test "x$ac_word" = "x-arch"; then
14301 ac_prev=arch
14302 fi
14303 done
14304fi
14305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14306 if test $ac_cv_c_bigendian = unknown; then
14307 # See if sys/param.h defines the BYTE_ORDER macro.
14308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014309/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014310#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014312
Martin v. Löwis11437992002-04-12 09:54:03 +000014313int
14314main ()
14315{
Matthias Kloseb9621712010-04-24 17:59:49 +000014316#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14317 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14318 && LITTLE_ENDIAN)
14319 bogus endian macros
14320 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014321
14322 ;
14323 return 0;
14324}
14325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014326if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014327 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014329/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014330#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014332
Martin v. Löwis11437992002-04-12 09:54:03 +000014333int
14334main ()
14335{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014336#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 not big endian
14338 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014339
14340 ;
14341 return 0;
14342}
14343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014344if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014345 ac_cv_c_bigendian=yes
14346else
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014350fi
14351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14352 fi
14353 if test $ac_cv_c_bigendian = unknown; then
14354 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014356/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014357#include <limits.h>
14358
Martin v. Löwis11437992002-04-12 09:54:03 +000014359int
14360main ()
14361{
Matthias Kloseb9621712010-04-24 17:59:49 +000014362#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14363 bogus endian macros
14364 #endif
14365
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ;
14367 return 0;
14368}
14369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014370if ac_fn_c_try_compile "$LINENO"; then :
14371 # It does; now see whether it defined to _BIG_ENDIAN or not.
14372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14373/* end confdefs.h. */
14374#include <limits.h>
14375
14376int
14377main ()
14378{
14379#ifndef _BIG_ENDIAN
14380 not big endian
14381 #endif
14382
14383 ;
14384 return 0;
14385}
14386_ACEOF
14387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014389else
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14393fi
14394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14395 fi
14396 if test $ac_cv_c_bigendian = unknown; then
14397 # Compile a test program.
14398 if test "$cross_compiling" = yes; then :
14399 # Try to guess by grepping values from an object file.
14400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14401/* end confdefs.h. */
14402short int ascii_mm[] =
14403 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14404 short int ascii_ii[] =
14405 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14406 int use_ascii (int i) {
14407 return ascii_mm[i] + ascii_ii[i];
14408 }
14409 short int ebcdic_ii[] =
14410 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14411 short int ebcdic_mm[] =
14412 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14413 int use_ebcdic (int i) {
14414 return ebcdic_mm[i] + ebcdic_ii[i];
14415 }
14416 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418int
14419main ()
14420{
14421return use_ascii (foo) == use_ebcdic (foo);
14422 ;
14423 return 0;
14424}
14425_ACEOF
14426if ac_fn_c_try_compile "$LINENO"; then :
14427 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14428 ac_cv_c_bigendian=yes
14429 fi
14430 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14431 if test "$ac_cv_c_bigendian" = unknown; then
14432 ac_cv_c_bigendian=no
14433 else
14434 # finding both strings is unlikely to happen, but who knows?
14435 ac_cv_c_bigendian=unknown
14436 fi
14437 fi
14438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014440else
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014442/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014443$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014444int
14445main ()
14446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 /* Are we little or big endian? From Harbison&Steele. */
14449 union
14450 {
14451 long int l;
14452 char c[sizeof (long int)];
14453 } u;
14454 u.l = 1;
14455 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456
14457 ;
14458 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014459}
Martin v. Löwis11437992002-04-12 09:54:03 +000014460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014461if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014462 ac_cv_c_bigendian=no
14463else
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14467 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14473$as_echo "$ac_cv_c_bigendian" >&6; }
14474 case $ac_cv_c_bigendian in #(
14475 yes)
14476 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14477;; #(
14478 no)
14479 ;; #(
14480 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 ;; #(
14485 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014486 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014487 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014489
Michael W. Hudson54241132001-12-07 15:38:26 +000014490
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014491# ABI version string for Python extension modules. This appears between the
14492# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14493# from the following attributes which affect the ABI of this Python build (in
14494# this order):
14495#
14496# * The Python implementation (always 'cpython-' for us)
14497# * The major and minor version numbers
14498# * --with-pydebug (adds a 'd')
14499# * --with-pymalloc (adds a 'm')
14500# * --with-wide-unicode (adds a 'u')
14501#
14502# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014503# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14504# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014505
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14507$as_echo_n "checking ABIFLAGS... " >&6; }
14508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14509$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14511$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014512SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14514$as_echo "$SOABI" >&6; }
14515
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014516
14517case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014518 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014519 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14520 *)
14521 EXT_SUFFIX=${SHLIB_SUFFIX};;
14522esac
14523
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14525$as_echo_n "checking LDVERSION... " >&6; }
14526LDVERSION='$(VERSION)$(ABIFLAGS)'
14527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14528$as_echo "$LDVERSION" >&6; }
14529
doko@python.org87421192013-01-26 11:39:31 +010014530
doko@ubuntu.com55532312016-06-14 08:55:19 +020014531if test x$PLATFORM_TRIPLET = x; then
14532 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14533else
14534 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14535fi
doko@python.org87421192013-01-26 11:39:31 +010014536
14537
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014538# Check whether right shifting a negative integer extends the sign bit
14539# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14541$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014542if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014543 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014544else
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
Matthias Kloseb9621712010-04-24 17:59:49 +000014546if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014547 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014548else
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014550/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014551
14552int main()
14553{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014554 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014555}
14556
Martin v. Löwis11437992002-04-12 09:54:03 +000014557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014558if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014559 ac_cv_rshift_extends_sign=yes
14560else
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14564 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014565fi
14566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567fi
14568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14570$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014571if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014572then
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
Matthias Kloseb9621712010-04-24 17:59:49 +000014574$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014575
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014576fi
14577
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014578# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14580$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014581if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014583else
Martin v. Löwis11437992002-04-12 09:54:03 +000014584
Matthias Kloseb9621712010-04-24 17:59:49 +000014585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014586/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014587#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014588int
14589main ()
14590{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014591
14592 FILE *f = fopen("/dev/null", "r");
14593 flockfile(f);
14594 getc_unlocked(f);
14595 funlockfile(f);
14596
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 ;
14598 return 0;
14599}
14600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014601if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014602 ac_cv_have_getc_unlocked=yes
14603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 ac_cv_have_getc_unlocked=no
14605fi
14606rm -f core conftest.err conftest.$ac_objext \
14607 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14611$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014612if test "$ac_cv_have_getc_unlocked" = yes
14613then
Martin v. Löwis11437992002-04-12 09:54:03 +000014614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014616
14617fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014618
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014619# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014620# save the value of LIBS so we don't actually link Python with readline
14621LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014622
Gregory P. Smith18820942008-09-07 06:24:49 +000014623# On some systems we need to link readline to a termcap compatible
14624# library. NOTE: Keep the precedence of listed libraries synchronised
14625# with setup.py.
14626py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14628$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014629for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014630 if test -z "$py_libtermcap"; then
14631 READLINE_LIBS="-lreadline"
14632 else
14633 READLINE_LIBS="-lreadline -l$py_libtermcap"
14634 fi
14635 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014637/* end confdefs.h. */
14638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014639/* Override any GCC internal prototype to avoid an error.
14640 Use char because int might match the return type of a GCC
14641 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014642#ifdef __cplusplus
14643extern "C"
14644#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014645char readline ();
14646int
14647main ()
14648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014649return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014650 ;
14651 return 0;
14652}
14653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014654if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014655 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014657rm -f core conftest.err conftest.$ac_objext \
14658 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014659 if test $py_cv_lib_readline = yes; then
14660 break
14661 fi
14662done
14663# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14664#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014665if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14667$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014668else
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14670$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014671
Matthias Kloseb9621712010-04-24 17:59:49 +000014672$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014673
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014674fi
14675
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014676# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14678$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014679if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014681else
14682 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014683LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014685/* end confdefs.h. */
14686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014687/* Override any GCC internal prototype to avoid an error.
14688 Use char because int might match the return type of a GCC
14689 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014690#ifdef __cplusplus
14691extern "C"
14692#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014693char rl_callback_handler_install ();
14694int
14695main ()
14696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014698 ;
14699 return 0;
14700}
14701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014702if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014703 ac_cv_lib_readline_rl_callback_handler_install=yes
14704else
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014707rm -f core conftest.err conftest.$ac_objext \
14708 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014709LIBS=$ac_check_lib_save_LIBS
14710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14712$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014713if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014716
14717fi
14718
14719
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014720# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014722/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014723#include <readline/readline.h>
14724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014725if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014726 have_readline=yes
14727else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014728 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014729
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014730fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014731rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014732if test $have_readline = yes
14733then
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014735/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014736#include <readline/readline.h>
14737
14738_ACEOF
14739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014741
Matthias Kloseb9621712010-04-24 17:59:49 +000014742$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014743
14744fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014745rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014746
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014748/* end confdefs.h. */
14749#include <readline/readline.h>
14750
14751_ACEOF
14752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014756
14757fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014758rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014759
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014760fi
14761
Martin v. Löwis0daad592001-09-30 21:09:59 +000014762# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14764$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014765if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014767else
Martin v. Löwis11437992002-04-12 09:54:03 +000014768 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014769LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773/* Override any GCC internal prototype to avoid an error.
14774 Use char because int might match the return type of a GCC
14775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014776#ifdef __cplusplus
14777extern "C"
14778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014779char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014780int
14781main ()
14782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 ;
14785 return 0;
14786}
14787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014790else
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014793rm -f core conftest.err conftest.$ac_objext \
14794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014795LIBS=$ac_check_lib_save_LIBS
14796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14798$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014799if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014800
Matthias Kloseb9621712010-04-24 17:59:49 +000014801$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014802
Martin v. Löwis0daad592001-09-30 21:09:59 +000014803fi
14804
Michael W. Hudson54241132001-12-07 15:38:26 +000014805
Thomas Wouters89d996e2007-09-08 17:39:28 +000014806# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14808$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014809if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014811else
14812 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014813LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014815/* end confdefs.h. */
14816
14817/* Override any GCC internal prototype to avoid an error.
14818 Use char because int might match the return type of a GCC
14819 builtin and then its argument prototype would still apply. */
14820#ifdef __cplusplus
14821extern "C"
14822#endif
14823char rl_completion_display_matches_hook ();
14824int
14825main ()
14826{
14827return rl_completion_display_matches_hook ();
14828 ;
14829 return 0;
14830}
14831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014832if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014833 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014837rm -f core conftest.err conftest.$ac_objext \
14838 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014839LIBS=$ac_check_lib_save_LIBS
14840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14842$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014843if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014846
14847fi
14848
14849
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014850# also in 4.0, but not in editline
14851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14852$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14853if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14854 $as_echo_n "(cached) " >&6
14855else
14856 ac_check_lib_save_LIBS=$LIBS
14857LIBS="-lreadline $READLINE_LIBS $LIBS"
14858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14859/* end confdefs.h. */
14860
14861/* Override any GCC internal prototype to avoid an error.
14862 Use char because int might match the return type of a GCC
14863 builtin and then its argument prototype would still apply. */
14864#ifdef __cplusplus
14865extern "C"
14866#endif
14867char rl_resize_terminal ();
14868int
14869main ()
14870{
14871return rl_resize_terminal ();
14872 ;
14873 return 0;
14874}
14875_ACEOF
14876if ac_fn_c_try_link "$LINENO"; then :
14877 ac_cv_lib_readline_rl_resize_terminal=yes
14878else
14879 ac_cv_lib_readline_rl_resize_terminal=no
14880fi
14881rm -f core conftest.err conftest.$ac_objext \
14882 conftest$ac_exeext conftest.$ac_ext
14883LIBS=$ac_check_lib_save_LIBS
14884fi
14885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14886$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14887if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14888
14889$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14890
14891fi
14892
14893
Martin v. Löwis0daad592001-09-30 21:09:59 +000014894# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14896$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014897if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014899else
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014901LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905/* Override any GCC internal prototype to avoid an error.
14906 Use char because int might match the return type of a GCC
14907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014908#ifdef __cplusplus
14909extern "C"
14910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014911char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014912int
14913main ()
14914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ;
14917 return 0;
14918}
14919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014922else
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014925rm -f core conftest.err conftest.$ac_objext \
14926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014927LIBS=$ac_check_lib_save_LIBS
14928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14930$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014931if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014934
Guido van Rossum353ae582001-07-10 16:45:32 +000014935fi
14936
Jack Jansendd19cf82001-12-06 22:36:17 +000014937
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014938# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014940/* end confdefs.h. */
14941#include <readline/readline.h>
14942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014943if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014944 have_readline=yes
14945else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014946 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014947
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014948fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014949rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014950if test $have_readline = yes
14951then
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014953/* end confdefs.h. */
14954#include <readline/readline.h>
14955
14956_ACEOF
14957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014959
Matthias Kloseb9621712010-04-24 17:59:49 +000014960$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014961
14962fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014963rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014964
14965fi
14966
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14968$as_echo_n "checking for append_history in -lreadline... " >&6; }
14969if ${ac_cv_lib_readline_append_history+:} false; then :
14970 $as_echo_n "(cached) " >&6
14971else
14972 ac_check_lib_save_LIBS=$LIBS
14973LIBS="-lreadline $READLINE_LIBS $LIBS"
14974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14975/* end confdefs.h. */
14976
14977/* Override any GCC internal prototype to avoid an error.
14978 Use char because int might match the return type of a GCC
14979 builtin and then its argument prototype would still apply. */
14980#ifdef __cplusplus
14981extern "C"
14982#endif
14983char append_history ();
14984int
14985main ()
14986{
14987return append_history ();
14988 ;
14989 return 0;
14990}
14991_ACEOF
14992if ac_fn_c_try_link "$LINENO"; then :
14993 ac_cv_lib_readline_append_history=yes
14994else
14995 ac_cv_lib_readline_append_history=no
14996fi
14997rm -f core conftest.err conftest.$ac_objext \
14998 conftest$ac_exeext conftest.$ac_ext
14999LIBS=$ac_check_lib_save_LIBS
15000fi
15001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15002$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15003if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15004
15005$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15006
15007fi
15008
15009
Martin v. Löwis82bca632006-02-10 20:49:30 +000015010# End of readline checks: restore LIBS
15011LIBS=$LIBS_no_readline
15012
Matthias Kloseb9621712010-04-24 17:59:49 +000015013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15014$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015015if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015017else
Martin v. Löwis11437992002-04-12 09:54:03 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015020 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015023/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015024
15025int main()
15026{
15027 int val1 = nice(1);
15028 if (val1 != -1 && val1 == nice(2))
15029 exit(0);
15030 exit(1);
15031}
15032
Martin v. Löwis11437992002-04-12 09:54:03 +000015033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015034if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015035 ac_cv_broken_nice=yes
15036else
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15040 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015041fi
15042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043fi
15044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15046$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015047if test "$ac_cv_broken_nice" = yes
15048then
Martin v. Löwis11437992002-04-12 09:54:03 +000015049
Matthias Kloseb9621712010-04-24 17:59:49 +000015050$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015051
15052fi
15053
Matthias Kloseb9621712010-04-24 17:59:49 +000015054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15055$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015056if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015058else
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015060 ac_cv_broken_poll=no
15061else
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015063/* end confdefs.h. */
15064
15065#include <poll.h>
15066
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015067int main()
15068{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015069 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015070 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015071
15072 close (42);
15073
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015074 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015075 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015076 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015077 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015078 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015079 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015080 return 1;
15081}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015082
15083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015084if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015085 ac_cv_broken_poll=yes
15086else
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15090 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015093fi
15094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15096$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015097if test "$ac_cv_broken_poll" = yes
15098then
15099
Matthias Kloseb9621712010-04-24 17:59:49 +000015100$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015101
15102fi
15103
Brett Cannon43802422005-02-10 20:48:03 +000015104# 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 +000015105# (which is not required by ISO C or UNIX spec) and/or if we support
15106# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015107ac_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 +000015108#include <$ac_cv_struct_tm>
15109
Matthias Kloseb9621712010-04-24 17:59:49 +000015110"
Victor Stinnere0be4232011-10-25 13:06:09 +020015111if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015112
15113cat >>confdefs.h <<_ACEOF
15114#define HAVE_STRUCT_TM_TM_ZONE 1
15115_ACEOF
15116
15117
15118fi
15119
15120if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15121
Matthias Kloseb9621712010-04-24 17:59:49 +000015122$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015123
15124else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15126"
Victor Stinnere0be4232011-10-25 13:06:09 +020015127if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131fi
15132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015134#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015135_ACEOF
15136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15138$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015139if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141else
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015143/* end confdefs.h. */
15144#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145#if !HAVE_DECL_TZNAME
15146extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015147#endif
15148
15149int
15150main ()
15151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015153 ;
15154 return 0;
15155}
15156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015157if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015158 ac_cv_var_tzname=yes
15159else
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015162rm -f core conftest.err conftest.$ac_objext \
15163 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15166$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015167 if test $ac_cv_var_tzname = yes; then
15168
Matthias Kloseb9621712010-04-24 17:59:49 +000015169$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015170
15171 fi
15172fi
15173
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015174
Martin v. Löwis1d459062005-03-14 21:23:33 +000015175# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15177$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015178if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015180else
15181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015183 ac_cv_working_tzset=no
15184else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015186/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015187
15188#include <stdlib.h>
15189#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015190#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015191
15192#if HAVE_TZNAME
15193extern char *tzname[];
15194#endif
15195
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015196int main()
15197{
Brett Cannon18367812003-09-19 00:59:16 +000015198 /* Note that we need to ensure that not only does tzset(3)
15199 do 'something' with localtime, but it works as documented
15200 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015201 This includes making sure that tzname is set properly if
15202 tm->tm_zone does not exist since it is the alternative way
15203 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015204
15205 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015206 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015207 */
15208
Martin v. Löwis1d459062005-03-14 21:23:33 +000015209 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015210 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15211
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015212 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015213 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015214 if (localtime(&groundhogday)->tm_hour != 0)
15215 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015216#if HAVE_TZNAME
15217 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15218 if (strcmp(tzname[0], "UTC") ||
15219 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15220 exit(1);
15221#endif
Brett Cannon18367812003-09-19 00:59:16 +000015222
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015223 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015224 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015225 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015226 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015227#if HAVE_TZNAME
15228 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15229 exit(1);
15230#endif
Brett Cannon18367812003-09-19 00:59:16 +000015231
15232 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15233 tzset();
15234 if (localtime(&groundhogday)->tm_hour != 11)
15235 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015236#if HAVE_TZNAME
15237 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15238 exit(1);
15239#endif
15240
15241#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015242 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15243 exit(1);
15244 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15245 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015246#endif
Brett Cannon18367812003-09-19 00:59:16 +000015247
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015248 exit(0);
15249}
15250
15251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015252if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015253 ac_cv_working_tzset=yes
15254else
Matthias Kloseb9621712010-04-24 17:59:49 +000015255 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15258 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015259fi
15260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261fi
15262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15264$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015265if test "$ac_cv_working_tzset" = yes
15266then
15267
Matthias Kloseb9621712010-04-24 17:59:49 +000015268$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015269
15270fi
15271
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015272# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15274$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015275if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015277else
Matthias Kloseb9621712010-04-24 17:59:49 +000015278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015279/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015280#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015281int
15282main ()
15283{
15284
15285struct stat st;
15286st.st_mtim.tv_nsec = 1;
15287
15288 ;
15289 return 0;
15290}
15291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015292if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015293 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015294else
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15298fi
15299
Matthias Kloseb9621712010-04-24 17:59:49 +000015300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15301$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015302if test "$ac_cv_stat_tv_nsec" = yes
15303then
15304
Matthias Kloseb9621712010-04-24 17:59:49 +000015305$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015306
15307fi
15308
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015309# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15311$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015312if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015314else
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015316/* end confdefs.h. */
15317#include <sys/stat.h>
15318int
15319main ()
15320{
15321
15322struct stat st;
15323st.st_mtimespec.tv_nsec = 1;
15324
15325 ;
15326 return 0;
15327}
15328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015330 ac_cv_stat_tv_nsec2=yes
15331else
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15335fi
15336
Matthias Kloseb9621712010-04-24 17:59:49 +000015337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15338$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015339if test "$ac_cv_stat_tv_nsec2" = yes
15340then
15341
Matthias Kloseb9621712010-04-24 17:59:49 +000015342$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015343
15344fi
15345
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015346# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015347ac_save_cppflags="$CPPFLAGS"
15348CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015349
15350for ac_header in curses.h ncurses.h
15351do :
15352 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15353ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15354if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15355 cat >>confdefs.h <<_ACEOF
15356#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15357_ACEOF
15358
15359fi
15360
15361done
15362
15363
15364# On Solaris, term.h requires curses.h
15365for ac_header in term.h
15366do :
15367 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15368#ifdef HAVE_CURSES_H
15369#include <curses.h>
15370#endif
15371
15372"
15373if test "x$ac_cv_header_term_h" = xyes; then :
15374 cat >>confdefs.h <<_ACEOF
15375#define HAVE_TERM_H 1
15376_ACEOF
15377
15378fi
15379
15380done
15381
15382
Jack Jansen666b1e72001-10-31 12:11:48 +000015383# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15385$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015386if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015387 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015388else
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015390/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015391#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015392int
15393main ()
15394{
Jack Jansen666b1e72001-10-31 12:11:48 +000015395
15396 int rtn;
15397 rtn = mvwdelch(0,0,0);
15398
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 ;
15400 return 0;
15401}
15402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015403if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015404 ac_cv_mvwdelch_is_expression=yes
15405else
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15409fi
15410
Matthias Kloseb9621712010-04-24 17:59:49 +000015411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15412$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015413
15414if test "$ac_cv_mvwdelch_is_expression" = yes
15415then
Martin v. Löwis11437992002-04-12 09:54:03 +000015416
Matthias Kloseb9621712010-04-24 17:59:49 +000015417$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015418
15419fi
15420
Matthias Kloseb9621712010-04-24 17:59:49 +000015421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15422$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015423if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015425else
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015427/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015428#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015429int
15430main ()
15431{
Jack Jansen666b1e72001-10-31 12:11:48 +000015432
15433 WINDOW *w;
15434 w->_flags = 0;
15435
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 ;
15437 return 0;
15438}
15439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015440if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015441 ac_cv_window_has_flags=yes
15442else
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15446fi
15447
Matthias Kloseb9621712010-04-24 17:59:49 +000015448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15449$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015450
Jack Jansen666b1e72001-10-31 12:11:48 +000015451
15452if test "$ac_cv_window_has_flags" = yes
15453then
Martin v. Löwis11437992002-04-12 09:54:03 +000015454
Matthias Kloseb9621712010-04-24 17:59:49 +000015455$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015456
15457fi
15458
Matthias Kloseb9621712010-04-24 17:59:49 +000015459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15460$as_echo_n "checking for is_term_resized... " >&6; }
15461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015462/* end confdefs.h. */
15463#include <curses.h>
15464int
15465main ()
15466{
15467void *x=is_term_resized
15468 ;
15469 return 0;
15470}
15471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015472if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015473
Matthias Kloseb9621712010-04-24 17:59:49 +000015474$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015475
Matthias Kloseb159a552010-04-25 21:00:44 +000015476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015477$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015478else
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15480$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015481
15482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15486$as_echo_n "checking for resize_term... " >&6; }
15487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015488/* end confdefs.h. */
15489#include <curses.h>
15490int
15491main ()
15492{
15493void *x=resize_term
15494 ;
15495 return 0;
15496}
15497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015498if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015499
Matthias Kloseb9621712010-04-24 17:59:49 +000015500$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015501
Matthias Kloseb159a552010-04-25 21:00:44 +000015502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015503$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15506$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015507
15508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15512$as_echo_n "checking for resizeterm... " >&6; }
15513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015514/* end confdefs.h. */
15515#include <curses.h>
15516int
15517main ()
15518{
15519void *x=resizeterm
15520 ;
15521 return 0;
15522}
15523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015524if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015527
Matthias Kloseb159a552010-04-25 21:00:44 +000015528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015529$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015530else
Matthias Kloseb9621712010-04-24 17:59:49 +000015531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15532$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015533
15534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015536# last curses configure check
15537CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15540$as_echo "$as_me: checking for device files" >&6;}
15541
15542if test "x$cross_compiling" = xyes; then
15543 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15545$as_echo_n "checking for /dev/ptmx... " >&6; }
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15547$as_echo "not set" >&6; }
15548 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15549 fi
15550 if test "${ac_cv_file__dev_ptc+set}" != set; then
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15552$as_echo_n "checking for /dev/ptc... " >&6; }
15553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15554$as_echo "not set" >&6; }
15555 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15556 fi
15557fi
15558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15560$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015561if ${ac_cv_file__dev_ptmx+:} false; then :
15562 $as_echo_n "(cached) " >&6
15563else
15564 test "$cross_compiling" = yes &&
15565 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15566if test -r "/dev/ptmx"; then
15567 ac_cv_file__dev_ptmx=yes
15568else
15569 ac_cv_file__dev_ptmx=no
15570fi
15571fi
15572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15573$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15574if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015575
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015576fi
15577
15578if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015579
Matthias Kloseb9621712010-04-24 17:59:49 +000015580$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015581
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15584$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015585if ${ac_cv_file__dev_ptc+:} false; then :
15586 $as_echo_n "(cached) " >&6
15587else
15588 test "$cross_compiling" = yes &&
15589 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15590if test -r "/dev/ptc"; then
15591 ac_cv_file__dev_ptc=yes
15592else
15593 ac_cv_file__dev_ptc=no
15594fi
15595fi
15596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15597$as_echo "$ac_cv_file__dev_ptc" >&6; }
15598if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015599
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015600fi
15601
15602if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015603
Matthias Kloseb9621712010-04-24 17:59:49 +000015604$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015605
Neal Norwitz865400f2003-03-21 01:42:58 +000015606fi
15607
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015609$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015610if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015611 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015612else
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015614 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015615if test x$GCC = xyes; then
15616save_CFLAGS=$CFLAGS
15617CFLAGS="$CFLAGS -Werror -Wformat"
15618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015619/* end confdefs.h. */
15620
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015621#include <stdio.h>
15622#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015623
15624int
15625main ()
15626{
15627
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015628char *buffer;
15629sprintf(buffer, "%lld", (long long)123);
15630sprintf(buffer, "%lld", (long long)-123);
15631sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015632
15633 ;
15634 return 0;
15635}
15636_ACEOF
15637if ac_fn_c_try_compile "$LINENO"; then :
15638 ac_cv_have_long_long_format=yes
15639
15640fi
15641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015642CFLAGS=$save_CFLAGS
15643fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015644else
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015646/* end confdefs.h. */
15647
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015648#include <stdio.h>
15649#include <stddef.h>
15650#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015651
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015652#ifdef HAVE_SYS_TYPES_H
15653#include <sys/types.h>
15654#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015655
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015656int main()
15657{
15658char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015659
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015660if (sprintf(buffer, "%lld", (long long)123) < 0)
15661return 1;
15662if (strcmp(buffer, "123"))
15663return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015664
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015665if (sprintf(buffer, "%lld", (long long)-123) < 0)
15666return 1;
15667if (strcmp(buffer, "-123"))
15668return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015669
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015670if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15671return 1;
15672if (strcmp(buffer, "123"))
15673return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015674
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015675return 0;
15676}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015677
15678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015679if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015680 ac_cv_have_long_long_format=yes
15681else
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15685 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015686fi
15687
15688
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015689fi
15690
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015692$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015693
Mark Dickinson89d7d412009-12-31 20:50:59 +000015694if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015695then
15696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015698
15699fi
15700
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015701if test $ac_sys_system = Darwin
15702then
15703 LIBS="$LIBS -framework CoreFoundation"
15704fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015705
Matthias Kloseb9621712010-04-24 17:59:49 +000015706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15707$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015708if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015709 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015710else
Matthias Kloseb9621712010-04-24 17:59:49 +000015711 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015712 ac_cv_have_size_t_format="cross -- assuming yes"
15713
Thomas Wouters477c8d52006-05-27 19:21:47 +000015714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015716/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015717
Thomas Wouters477c8d52006-05-27 19:21:47 +000015718#include <stdio.h>
15719#include <stddef.h>
15720#include <string.h>
15721
Christian Heimes2c181612007-12-17 20:04:13 +000015722#ifdef HAVE_SYS_TYPES_H
15723#include <sys/types.h>
15724#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015725
15726#ifdef HAVE_SSIZE_T
15727typedef ssize_t Py_ssize_t;
15728#elif SIZEOF_VOID_P == SIZEOF_LONG
15729typedef long Py_ssize_t;
15730#else
15731typedef int Py_ssize_t;
15732#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015733
Christian Heimes2c181612007-12-17 20:04:13 +000015734int main()
15735{
15736 char buffer[256];
15737
Thomas Wouters477c8d52006-05-27 19:21:47 +000015738 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15739 return 1;
15740
Thomas Wouters89f507f2006-12-13 04:49:30 +000015741 if (strcmp(buffer, "123"))
15742 return 1;
15743
15744 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15745 return 1;
15746
15747 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015748 return 1;
15749
15750 return 0;
15751}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015752
Thomas Wouters477c8d52006-05-27 19:21:47 +000015753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015754if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015755 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015756else
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015761fi
15762
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15765$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015766if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015767
Matthias Kloseb9621712010-04-24 17:59:49 +000015768$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015769
15770fi
15771
Matthias Kloseb9621712010-04-24 17:59:49 +000015772ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015773#ifdef HAVE_SYS_TYPES_H
15774#include <sys/types.h>
15775#endif
15776#ifdef HAVE_SYS_SOCKET_H
15777#include <sys/socket.h>
15778#endif
15779
Matthias Kloseb9621712010-04-24 17:59:49 +000015780"
Victor Stinnere0be4232011-10-25 13:06:09 +020015781if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015786
15787fi
15788
Michael W. Hudson54241132001-12-07 15:38:26 +000015789
Matthias Kloseb9621712010-04-24 17:59:49 +000015790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15791$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015792if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015794else
Matthias Kloseb9621712010-04-24 17:59:49 +000015795 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015796 ac_cv_broken_mbstowcs=no
15797else
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015799/* end confdefs.h. */
15800
Stefan Krah19c21392012-11-22 23:47:32 +010015801#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015802#include<stdlib.h>
15803int main() {
15804 size_t len = -1;
15805 const char *str = "text";
15806 len = mbstowcs(NULL, str, 0);
15807 return (len != 4);
15808}
15809
15810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015811if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015812 ac_cv_broken_mbstowcs=no
15813else
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15817 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015818fi
15819
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015820fi
15821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15823$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015824if test "$ac_cv_broken_mbstowcs" = yes
15825then
15826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015828
15829fi
15830
Antoine Pitroub52ec782009-01-25 16:34:23 +000015831# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15833$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015834
15835# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015836if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015837 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015838if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015839then
15840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15844$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015845fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015846if test "$withval" = no
15847then
15848
15849$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15850
Matthias Kloseb9621712010-04-24 17:59:49 +000015851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15852$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015853fi
15854
Antoine Pitrou042b1282010-08-13 21:15:58 +000015855else
15856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15857$as_echo "no value specified" >&6; }
15858fi
15859
Antoine Pitroub52ec782009-01-25 16:34:23 +000015860
Matthias Kloseb17289e2012-03-15 19:51:34 +010015861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15862$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15863if ${ac_cv_computed_gotos+:} false; then :
15864 $as_echo_n "(cached) " >&6
15865else
15866 if test "$cross_compiling" = yes; then :
15867 if test "${with_computed_gotos+set}" = set; then
15868 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15869 else
15870 ac_cv_computed_gotos=no
15871 fi
15872else
15873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15874/* end confdefs.h. */
15875
15876int main(int argc, char **argv)
15877{
15878 static void *targets[1] = { &&LABEL1 };
15879 goto LABEL2;
15880LABEL1:
15881 return 0;
15882LABEL2:
15883 goto *targets[0];
15884 return 1;
15885}
15886
15887_ACEOF
15888if ac_fn_c_try_run "$LINENO"; then :
15889 ac_cv_computed_gotos=yes
15890else
15891 ac_cv_computed_gotos=no
15892fi
15893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15894 conftest.$ac_objext conftest.beam conftest.$ac_ext
15895fi
15896
15897fi
15898
15899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15900$as_echo "$ac_cv_computed_gotos" >&6; }
15901case "$ac_cv_computed_gotos" in yes*)
15902
15903$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15904
15905esac
15906
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015907case $ac_sys_system in
15908AIX*)
15909
15910$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15911 ;;
15912esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015913
Michael W. Hudson54241132001-12-07 15:38:26 +000015914
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015915
15916
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015917for h in `(cd $srcdir;echo Python/thread_*.h)`
15918do
15919 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15920done
15921
Michael W. Hudson54241132001-12-07 15:38:26 +000015922
Ned Deily0db50cf2014-07-25 12:41:31 -070015923SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15925$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015926for dir in $SRCDIRS; do
15927 if test ! -d $dir; then
15928 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015929 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015930done
Matthias Kloseb9621712010-04-24 17:59:49 +000015931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15932$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015933
Stefan Krah1919b7e2012-03-21 18:25:23 +010015934# Availability of -O2:
15935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15936$as_echo_n "checking for -O2... " >&6; }
15937saved_cflags="$CFLAGS"
15938CFLAGS="-O2"
15939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15940/* end confdefs.h. */
15941
15942int
15943main ()
15944{
15945
15946
15947 ;
15948 return 0;
15949}
15950_ACEOF
15951if ac_fn_c_try_compile "$LINENO"; then :
15952 have_O2=yes
15953else
15954 have_O2=no
15955fi
15956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15958$as_echo "$have_O2" >&6; }
15959CFLAGS="$saved_cflags"
15960
15961# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15962# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15964$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15965saved_cflags="$CFLAGS"
15966CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15967if test "$have_O2" = no; then
15968 CFLAGS=""
15969fi
15970if test "$cross_compiling" = yes; then :
15971 have_glibc_memmove_bug=undefined
15972else
15973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15974/* end confdefs.h. */
15975
15976#include <stdio.h>
15977#include <stdlib.h>
15978#include <string.h>
15979void foo(void *p, void *q) { memmove(p, q, 19); }
15980int main() {
15981 char a[32] = "123456789000000000";
15982 foo(&a[9], a);
15983 if (strcmp(a, "123456789123456789000000000") != 0)
15984 return 1;
15985 foo(a, &a[9]);
15986 if (strcmp(a, "123456789000000000") != 0)
15987 return 1;
15988 return 0;
15989}
15990
15991_ACEOF
15992if ac_fn_c_try_run "$LINENO"; then :
15993 have_glibc_memmove_bug=no
15994else
15995 have_glibc_memmove_bug=yes
15996fi
15997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15998 conftest.$ac_objext conftest.beam conftest.$ac_ext
15999fi
16000
16001CFLAGS="$saved_cflags"
16002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16003$as_echo "$have_glibc_memmove_bug" >&6; }
16004if test "$have_glibc_memmove_bug" = yes; then
16005
16006$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16007
16008fi
16009
16010if test "$have_gcc_asm_for_x87" = yes; then
16011 # Some versions of gcc miscompile inline asm:
16012 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16013 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16014 case $CC in
16015 *gcc*)
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16017$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16018 saved_cflags="$CFLAGS"
16019 CFLAGS="-O2"
16020 if test "$cross_compiling" = yes; then :
16021 have_ipa_pure_const_bug=undefined
16022else
16023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16024/* end confdefs.h. */
16025
16026 __attribute__((noinline)) int
16027 foo(int *p) {
16028 int r;
16029 asm ( "movl \$6, (%1)\n\t"
16030 "xorl %0, %0\n\t"
16031 : "=r" (r) : "r" (p) : "memory"
16032 );
16033 return r;
16034 }
16035 int main() {
16036 int p = 8;
16037 if ((foo(&p) ? : p) != 6)
16038 return 1;
16039 return 0;
16040 }
16041
16042_ACEOF
16043if ac_fn_c_try_run "$LINENO"; then :
16044 have_ipa_pure_const_bug=no
16045else
16046 have_ipa_pure_const_bug=yes
16047fi
16048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16049 conftest.$ac_objext conftest.beam conftest.$ac_ext
16050fi
16051
16052 CFLAGS="$saved_cflags"
16053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16054$as_echo "$have_ipa_pure_const_bug" >&6; }
16055 if test "$have_ipa_pure_const_bug" = yes; then
16056
16057$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16058
16059 fi
16060 ;;
16061 esac
16062fi
16063
Victor Stinner4f5366e2015-01-09 02:13:19 +010016064# Check for stdatomic.h
16065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16066$as_echo_n "checking for stdatomic.h... " >&6; }
16067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16068/* end confdefs.h. */
16069
16070
16071 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016072 atomic_int value = ATOMIC_VAR_INIT(1);
16073 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016074 int main() {
16075 int loaded_value = atomic_load(&value);
16076 return 0;
16077 }
16078
16079
16080_ACEOF
16081if ac_fn_c_try_link "$LINENO"; then :
16082 have_stdatomic_h=yes
16083else
16084 have_stdatomic_h=no
16085fi
16086rm -f core conftest.err conftest.$ac_objext \
16087 conftest$ac_exeext conftest.$ac_ext
16088
16089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16090$as_echo "$have_stdatomic_h" >&6; }
16091
16092if test "$have_stdatomic_h" = yes; then
16093
16094$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16095
16096fi
16097
16098# Check for GCC >= 4.7 __atomic builtins
16099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16100$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102/* end confdefs.h. */
16103
16104
16105 volatile int val = 1;
16106 int main() {
16107 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16108 return 0;
16109 }
16110
16111
16112_ACEOF
16113if ac_fn_c_try_link "$LINENO"; then :
16114 have_builtin_atomic=yes
16115else
16116 have_builtin_atomic=no
16117fi
16118rm -f core conftest.err conftest.$ac_objext \
16119 conftest$ac_exeext conftest.$ac_ext
16120
16121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16122$as_echo "$have_builtin_atomic" >&6; }
16123
16124if test "$have_builtin_atomic" = yes; then
16125
16126$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16127
16128fi
16129
Ned Deily322f5ba2013-11-21 23:01:59 -080016130# ensurepip option
16131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16132$as_echo_n "checking for ensurepip... " >&6; }
16133
16134# Check whether --with-ensurepip was given.
16135if test "${with_ensurepip+set}" = set; then :
16136 withval=$with_ensurepip;
16137else
16138 with_ensurepip=upgrade
16139fi
16140
16141case $with_ensurepip in #(
16142 yes|upgrade) :
16143 ENSUREPIP=upgrade ;; #(
16144 install) :
16145 ENSUREPIP=install ;; #(
16146 no) :
16147 ENSUREPIP=no ;; #(
16148 *) :
16149 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16150esac
16151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16152$as_echo "$ENSUREPIP" >&6; }
16153
16154
Victor Stinner35a97c02015-03-08 02:59:09 +010016155# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16157$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159/* end confdefs.h. */
16160
16161
16162 #include <dirent.h>
16163
16164 int main() {
16165 struct dirent entry;
16166 return entry.d_type == DT_UNKNOWN;
16167 }
16168
16169
16170_ACEOF
16171if ac_fn_c_try_link "$LINENO"; then :
16172 have_dirent_d_type=yes
16173else
16174 have_dirent_d_type=no
16175fi
16176rm -f core conftest.err conftest.$ac_objext \
16177 conftest$ac_exeext conftest.$ac_ext
16178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16179$as_echo "$have_dirent_d_type" >&6; }
16180
16181if test "$have_dirent_d_type" = yes; then
16182
16183$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16184
16185fi
16186
Victor Stinner9eb57c52015-03-19 22:21:49 +010016187# check if the Linux getrandom() syscall is available
16188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16189$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16191/* end confdefs.h. */
16192
16193
Victor Stinner1b80b242016-04-12 22:34:58 +020016194 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016195 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016196 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016197
16198 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016199 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016200 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016201 const int flags = GRND_NONBLOCK;
16202 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016203 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016204 return 0;
16205 }
16206
16207
16208_ACEOF
16209if ac_fn_c_try_link "$LINENO"; then :
16210 have_getrandom_syscall=yes
16211else
16212 have_getrandom_syscall=no
16213fi
16214rm -f core conftest.err conftest.$ac_objext \
16215 conftest$ac_exeext conftest.$ac_ext
16216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16217$as_echo "$have_getrandom_syscall" >&6; }
16218
16219if test "$have_getrandom_syscall" = yes; then
16220
16221$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16222
16223fi
16224
Victor Stinner3abf44e2015-09-18 15:38:37 +020016225# check if the getrandom() function is available
16226# the test was written for the Solaris function of <sys/random.h>
16227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16228$as_echo_n "checking for the getrandom() function... " >&6; }
16229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16230/* end confdefs.h. */
16231
16232
16233 #include <sys/random.h>
16234
16235 int main() {
16236 char buffer[1];
16237 const size_t buflen = sizeof(buffer);
16238 const int flags = 0;
16239 /* ignore the result, Python checks for ENOSYS at runtime */
16240 (void)getrandom(buffer, buflen, flags);
16241 return 0;
16242 }
16243
16244
16245_ACEOF
16246if ac_fn_c_try_link "$LINENO"; then :
16247 have_getrandom=yes
16248else
16249 have_getrandom=no
16250fi
16251rm -f core conftest.err conftest.$ac_objext \
16252 conftest$ac_exeext conftest.$ac_ext
16253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16254$as_echo "$have_getrandom" >&6; }
16255
16256if test "$have_getrandom" = yes; then
16257
16258$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16259
16260fi
16261
Guido van Rossum627b2d71993-12-24 10:39:16 +000016262# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016263ac_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 +000016264
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016265ac_config_files="$ac_config_files Modules/ld_so_aix"
16266
Martin v. Löwis11437992002-04-12 09:54:03 +000016267cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016268# This file is a shell script that caches the results of configure
16269# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016270# scripts and configure runs, see configure's option --config-cache.
16271# It is not useful on other systems. If it contains results you don't
16272# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016273#
Martin v. Löwis11437992002-04-12 09:54:03 +000016274# config.status only pays attention to the cache file if you give it
16275# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016276#
Skip Montanaro6dead952003-09-25 14:50:04 +000016277# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016278# loading this file, other *unset* `ac_cv_foo' will be assigned the
16279# following values.
16280
16281_ACEOF
16282
Guido van Rossumf78abae1997-01-21 22:02:36 +000016283# The following way of writing the cache mishandles newlines in values,
16284# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016286# Ultrix sh set writes to stderr and can't be redirected directly,
16287# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288(
16289 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16290 eval ac_val=\$$ac_var
16291 case $ac_val in #(
16292 *${as_nl}*)
16293 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016294 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16295$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296 esac
16297 case $ac_var in #(
16298 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016299 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16300 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301 esac ;;
16302 esac
16303 done
16304
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16307 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016308 # `set' does not quote correctly, so add quotes: double-quote
16309 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016310 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016311 "s/'/'\\\\''/g;
16312 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 *)
16315 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318 esac |
16319 sort
16320) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16326 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16328 :end' >>confcache
16329if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16330 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016331 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016332 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16333$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016334 if test ! -f "$cache_file" || test -h "$cache_file"; then
16335 cat confcache >"$cache_file"
16336 else
16337 case $cache_file in #(
16338 */* | ?:*)
16339 mv -f confcache "$cache_file"$$ &&
16340 mv -f "$cache_file"$$ "$cache_file" ;; #(
16341 *)
16342 mv -f confcache "$cache_file" ;;
16343 esac
16344 fi
16345 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016346 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016347 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16348$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016349 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016350fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016351rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016352
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016353test "x$prefix" = xNONE && prefix=$ac_default_prefix
16354# Let make expand exec_prefix.
16355test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016357DEFS=-DHAVE_CONFIG_H
16358
Skip Montanaro6dead952003-09-25 14:50:04 +000016359ac_libobjs=
16360ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016361U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016362for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16363 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016365 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16367 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016368 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16369 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016370done
16371LIBOBJS=$ac_libobjs
16372
16373LTLIBOBJS=$ac_ltlibobjs
16374
16375
Martin v. Löwis11437992002-04-12 09:54:03 +000016376
Matthias Kloseb9621712010-04-24 17:59:49 +000016377
Victor Stinnere0be4232011-10-25 13:06:09 +020016378: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016379ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016380ac_clean_files_save=$ac_clean_files
16381ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016382{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16383$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16384as_write_fail=0
16385cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016386#! $SHELL
16387# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016388# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016389# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016390# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016391
Martin v. Löwis11437992002-04-12 09:54:03 +000016392debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016393ac_cs_recheck=false
16394ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016395
Matthias Kloseb9621712010-04-24 17:59:49 +000016396SHELL=\${CONFIG_SHELL-$SHELL}
16397export SHELL
16398_ASEOF
16399cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16400## -------------------- ##
16401## M4sh Initialization. ##
16402## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404# Be more Bourne compatible
16405DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016406if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 emulate sh
16408 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016410 # is contrary to our usage. Disable this feature.
16411 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016413else
Matthias Kloseb9621712010-04-24 17:59:49 +000016414 case `(set -o) 2>/dev/null` in #(
16415 *posix*) :
16416 set -o posix ;; #(
16417 *) :
16418 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016420fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016421
16422
Matthias Kloseb9621712010-04-24 17:59:49 +000016423as_nl='
16424'
16425export as_nl
16426# Printing a long string crashes Solaris 7 /usr/bin/printf.
16427as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16428as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16429as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16430# Prefer a ksh shell builtin over an external printf program on Solaris,
16431# but without wasting forks for bash or zsh.
16432if test -z "$BASH_VERSION$ZSH_VERSION" \
16433 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16434 as_echo='print -r --'
16435 as_echo_n='print -rn --'
16436elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16437 as_echo='printf %s\n'
16438 as_echo_n='printf %s'
16439else
16440 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16441 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16442 as_echo_n='/usr/ucb/echo -n'
16443 else
16444 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16445 as_echo_n_body='eval
16446 arg=$1;
16447 case $arg in #(
16448 *"$as_nl"*)
16449 expr "X$arg" : "X\\(.*\\)$as_nl";
16450 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16451 esac;
16452 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16453 '
16454 export as_echo_n_body
16455 as_echo_n='sh -c $as_echo_n_body as_echo'
16456 fi
16457 export as_echo_body
16458 as_echo='sh -c $as_echo_body as_echo'
16459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016460
16461# The user is always right.
16462if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016463 PATH_SEPARATOR=:
16464 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16465 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16466 PATH_SEPARATOR=';'
16467 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470
16471# IFS
16472# We need space, tab and new line, in precisely that order. Quoting is
16473# there to prevent editors from complaining about space-tab.
16474# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16475# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016476IFS=" "" $as_nl"
16477
16478# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016479as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016480case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481 *[\\/]* ) as_myself=$0 ;;
16482 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016483for as_dir in $PATH
16484do
16485 IFS=$as_save_IFS
16486 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016487 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16488 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016491 ;;
16492esac
16493# We did not find ourselves, most probably we were run as `sh COMMAND'
16494# in which case we are not to be found in the path.
16495if test "x$as_myself" = x; then
16496 as_myself=$0
16497fi
16498if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016499 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16500 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016501fi
16502
Matthias Kloseb9621712010-04-24 17:59:49 +000016503# Unset variables that we do not need and which cause bugs (e.g. in
16504# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16505# suppresses any "Segmentation fault" message there. '((' could
16506# trigger a bug in pdksh 5.2.14.
16507for as_var in BASH_ENV ENV MAIL MAILPATH
16508do eval test x\${$as_var+set} = xset \
16509 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510done
16511PS1='$ '
16512PS2='> '
16513PS4='+ '
16514
16515# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016516LC_ALL=C
16517export LC_ALL
16518LANGUAGE=C
16519export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520
Matthias Kloseb9621712010-04-24 17:59:49 +000016521# CDPATH.
16522(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16523
16524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016525# as_fn_error STATUS ERROR [LINENO LOG_FD]
16526# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016527# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16528# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016529# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016530as_fn_error ()
16531{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016532 as_status=$1; test $as_status -eq 0 && as_status=1
16533 if test "$4"; then
16534 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16535 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016536 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016537 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016538 as_fn_exit $as_status
16539} # as_fn_error
16540
16541
16542# as_fn_set_status STATUS
16543# -----------------------
16544# Set $? to STATUS, without forking.
16545as_fn_set_status ()
16546{
16547 return $1
16548} # as_fn_set_status
16549
16550# as_fn_exit STATUS
16551# -----------------
16552# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16553as_fn_exit ()
16554{
16555 set +e
16556 as_fn_set_status $1
16557 exit $1
16558} # as_fn_exit
16559
16560# as_fn_unset VAR
16561# ---------------
16562# Portably unset VAR.
16563as_fn_unset ()
16564{
16565 { eval $1=; unset $1;}
16566}
16567as_unset=as_fn_unset
16568# as_fn_append VAR VALUE
16569# ----------------------
16570# Append the text in VALUE to the end of the definition contained in VAR. Take
16571# advantage of any shell optimizations that allow amortized linear growth over
16572# repeated appends, instead of the typical quadratic growth present in naive
16573# implementations.
16574if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16575 eval 'as_fn_append ()
16576 {
16577 eval $1+=\$2
16578 }'
16579else
16580 as_fn_append ()
16581 {
16582 eval $1=\$$1\$2
16583 }
16584fi # as_fn_append
16585
16586# as_fn_arith ARG...
16587# ------------------
16588# Perform arithmetic evaluation on the ARGs, and store the result in the
16589# global $as_val. Take advantage of shells that can avoid forks. The arguments
16590# must be portable across $(()) and expr.
16591if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16592 eval 'as_fn_arith ()
16593 {
16594 as_val=$(( $* ))
16595 }'
16596else
16597 as_fn_arith ()
16598 {
16599 as_val=`expr "$@" || test $? -eq 1`
16600 }
16601fi # as_fn_arith
16602
16603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604if expr a : '\(a\)' >/dev/null 2>&1 &&
16605 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16606 as_expr=expr
16607else
16608 as_expr=false
16609fi
16610
16611if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16612 as_basename=basename
16613else
16614 as_basename=false
16615fi
16616
Matthias Kloseb9621712010-04-24 17:59:49 +000016617if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16618 as_dirname=dirname
16619else
16620 as_dirname=false
16621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623as_me=`$as_basename -- "$0" ||
16624$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16625 X"$0" : 'X\(//\)$' \| \
16626 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016627$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628 sed '/^.*\/\([^/][^/]*\)\/*$/{
16629 s//\1/
16630 q
16631 }
16632 /^X\/\(\/\/\)$/{
16633 s//\1/
16634 q
16635 }
16636 /^X\/\(\/\).*/{
16637 s//\1/
16638 q
16639 }
16640 s/.*/./; q'`
16641
Matthias Kloseb9621712010-04-24 17:59:49 +000016642# Avoid depending upon Character Ranges.
16643as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16644as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16645as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16646as_cr_digits='0123456789'
16647as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016648
16649ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016650case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016652 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016653 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016654 xy) ECHO_C='\c';;
16655 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16656 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016657 esac;;
16658*)
16659 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016660esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016661
Martin v. Löwis11437992002-04-12 09:54:03 +000016662rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663if test -d conf$$.dir; then
16664 rm -f conf$$.dir/conf$$.file
16665else
16666 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016667 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016669if (echo >conf$$.file) 2>/dev/null; then
16670 if ln -s conf$$.file conf$$ 2>/dev/null; then
16671 as_ln_s='ln -s'
16672 # ... but there are two gotchas:
16673 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16674 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016675 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016676 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016677 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016678 elif ln conf$$.file conf$$ 2>/dev/null; then
16679 as_ln_s=ln
16680 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016681 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016683else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016684 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16687rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016688
Matthias Kloseb9621712010-04-24 17:59:49 +000016689
16690# as_fn_mkdir_p
16691# -------------
16692# Create "$as_dir" as a directory, including parents if necessary.
16693as_fn_mkdir_p ()
16694{
16695
16696 case $as_dir in #(
16697 -*) as_dir=./$as_dir;;
16698 esac
16699 test -d "$as_dir" || eval $as_mkdir_p || {
16700 as_dirs=
16701 while :; do
16702 case $as_dir in #(
16703 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16704 *) as_qdir=$as_dir;;
16705 esac
16706 as_dirs="'$as_qdir' $as_dirs"
16707 as_dir=`$as_dirname -- "$as_dir" ||
16708$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16709 X"$as_dir" : 'X\(//\)[^/]' \| \
16710 X"$as_dir" : 'X\(//\)$' \| \
16711 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16712$as_echo X"$as_dir" |
16713 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16714 s//\1/
16715 q
16716 }
16717 /^X\(\/\/\)[^/].*/{
16718 s//\1/
16719 q
16720 }
16721 /^X\(\/\/\)$/{
16722 s//\1/
16723 q
16724 }
16725 /^X\(\/\).*/{
16726 s//\1/
16727 q
16728 }
16729 s/.*/./; q'`
16730 test -d "$as_dir" && break
16731 done
16732 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016733 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016734
16735
16736} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016737if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016738 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016739else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016740 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016741 as_mkdir_p=false
16742fi
16743
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016744
16745# as_fn_executable_p FILE
16746# -----------------------
16747# Test if FILE is an executable regular file.
16748as_fn_executable_p ()
16749{
16750 test -f "$1" && test -x "$1"
16751} # as_fn_executable_p
16752as_test_x='test -x'
16753as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016754
16755# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016756as_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 +000016757
16758# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016759as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016760
16761
Martin v. Löwis11437992002-04-12 09:54:03 +000016762exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016763## ----------------------------------- ##
16764## Main body of $CONFIG_STATUS script. ##
16765## ----------------------------------- ##
16766_ASEOF
16767test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016768
Matthias Kloseb9621712010-04-24 17:59:49 +000016769cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16770# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016771# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016772# values after options handling.
16773ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016774This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016775generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016776
16777 CONFIG_FILES = $CONFIG_FILES
16778 CONFIG_HEADERS = $CONFIG_HEADERS
16779 CONFIG_LINKS = $CONFIG_LINKS
16780 CONFIG_COMMANDS = $CONFIG_COMMANDS
16781 $ $0 $@
16782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016783on `(hostname || uname -n) 2>/dev/null | sed 1q`
16784"
16785
Martin v. Löwis11437992002-04-12 09:54:03 +000016786_ACEOF
16787
Matthias Kloseb9621712010-04-24 17:59:49 +000016788case $ac_config_files in *"
16789"*) set x $ac_config_files; shift; ac_config_files=$*;;
16790esac
16791
16792case $ac_config_headers in *"
16793"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16794esac
16795
16796
16797cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016798# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016799config_files="$ac_config_files"
16800config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016803
Matthias Kloseb9621712010-04-24 17:59:49 +000016804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016805ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016806\`$as_me' instantiates files and other configuration actions
16807from templates according to the current configuration. Unless the files
16808and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016809
Matthias Kloseb9621712010-04-24 17:59:49 +000016810Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016811
16812 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016813 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016814 --config print configuration, then exit
16815 -q, --quiet, --silent
16816 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016817 -d, --debug don't remove temporary files
16818 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016819 --file=FILE[:TEMPLATE]
16820 instantiate the configuration file FILE
16821 --header=FILE[:TEMPLATE]
16822 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016823
16824Configuration files:
16825$config_files
16826
16827Configuration headers:
16828$config_headers
16829
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016830Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16834ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016835ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016836python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016837configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016838 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016839
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016840Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016841This config.status script is free software; the Free Software Foundation
16842gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843
16844ac_pwd='$ac_pwd'
16845srcdir='$srcdir'
16846INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016847MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016848test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016849_ACEOF
16850
Matthias Kloseb9621712010-04-24 17:59:49 +000016851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16852# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016853ac_need_defaults=:
16854while test $# != 0
16855do
16856 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016857 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16859 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016860 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016861 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016862 --*=)
16863 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16864 ac_optarg=
16865 ac_shift=:
16866 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016867 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016868 ac_option=$1
16869 ac_optarg=$2
16870 ac_shift=shift
16871 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 esac
16873
Skip Montanaro6dead952003-09-25 14:50:04 +000016874 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016875 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016876 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16877 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016878 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016879 $as_echo "$ac_cs_version"; exit ;;
16880 --config | --confi | --conf | --con | --co | --c )
16881 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016882 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016883 debug=: ;;
16884 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016885 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016886 case $ac_optarg in
16887 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016888 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016889 esac
16890 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016891 ac_need_defaults=false;;
16892 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016893 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016894 case $ac_optarg in
16895 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16896 esac
16897 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899 --he | --h)
16900 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016901 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016902Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016905 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16906 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16907 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016908
16909 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016910 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016911Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016912
Matthias Kloseb9621712010-04-24 17:59:49 +000016913 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016915
16916 esac
16917 shift
16918done
16919
Skip Montanaro6dead952003-09-25 14:50:04 +000016920ac_configure_extra_args=
16921
16922if $ac_cs_silent; then
16923 exec 6>/dev/null
16924 ac_configure_extra_args="$ac_configure_extra_args --silent"
16925fi
16926
16927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016929if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016930 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016931 shift
16932 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16933 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016934 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016935 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016936fi
16937
Martin v. Löwis11437992002-04-12 09:54:03 +000016938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016940exec 5>>config.log
16941{
16942 echo
16943 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16944## Running $as_me. ##
16945_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016946 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016950cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016952
Matthias Kloseb9621712010-04-24 17:59:49 +000016953cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016954
16955# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016956for ac_config_target in $ac_config_targets
16957do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016958 case $ac_config_target in
16959 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16960 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16961 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016962 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16963 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016964 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16965 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016966 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016967 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016968 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016969
Victor Stinnere0be4232011-10-25 13:06:09 +020016970 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016971 esac
16972done
16973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016974
Martin v. Löwis11437992002-04-12 09:54:03 +000016975# If the user did not use the arguments to specify the items to instantiate,
16976# then the envvar interface is used. Set only those that are not.
16977# We use the long form for the default assignment because of an extremely
16978# bizarre bug on SunOS 4.1.3.
16979if $ac_need_defaults; then
16980 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16981 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16982fi
16983
Skip Montanaro6dead952003-09-25 14:50:04 +000016984# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016985# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016986# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987# Hook for its removal unless debugging.
16988# Note that there is a small window in which the directory will not be cleaned:
16989# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016990$debug ||
16991{
Victor Stinnere0be4232011-10-25 13:06:09 +020016992 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016994 : "${ac_tmp:=$tmp}"
16995 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016997 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016998}
Martin v. Löwis11437992002-04-12 09:54:03 +000016999# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017000
Martin v. Löwis11437992002-04-12 09:54:03 +000017001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017003 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017004} ||
17005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006 tmp=./conf$$-$RANDOM
17007 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017008} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017009ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017010
Matthias Kloseb9621712010-04-24 17:59:49 +000017011# Set up the scripts for CONFIG_FILES section.
17012# No need to generate them if there are no CONFIG_FILES.
17013# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016
17017ac_cr=`echo X | tr X '\015'`
17018# On cygwin, bash can eat \r inside `` if the user requested igncr.
17019# But we know of no other shell where ac_cr would be empty at this
17020# point, so we can use a bashism as a fallback.
17021if test "x$ac_cr" = x; then
17022 eval ac_cr=\$\'\\r\'
17023fi
17024ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17025if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017026 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017027else
17028 ac_cs_awk_cr=$ac_cr
17029fi
17030
Victor Stinnere0be4232011-10-25 13:06:09 +020017031echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017032_ACEOF
17033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034
Matthias Kloseb9621712010-04-24 17:59:49 +000017035{
17036 echo "cat >conf$$subs.awk <<_ACEOF" &&
17037 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17038 echo "_ACEOF"
17039} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017040 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17041ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042ac_delim='%!_!# '
17043for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017044 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017045 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046
Matthias Kloseb9621712010-04-24 17:59:49 +000017047 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17048 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017049 break
17050 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017051 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052 else
17053 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055done
Matthias Kloseb9621712010-04-24 17:59:49 +000017056rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017057
Matthias Kloseb9621712010-04-24 17:59:49 +000017058cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017059cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017061sed -n '
17062h
17063s/^/S["/; s/!.*/"]=/
17064p
17065g
17066s/^[^!]*!//
17067:repl
17068t repl
17069s/'"$ac_delim"'$//
17070t delim
17071:nl
17072h
17073s/\(.\{148\}\)..*/\1/
17074t more1
17075s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17076p
17077n
17078b repl
17079:more1
17080s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17081p
17082g
17083s/.\{148\}//
17084t nl
17085:delim
17086h
17087s/\(.\{148\}\)..*/\1/
17088t more2
17089s/["\\]/\\&/g; s/^/"/; s/$/"/
17090p
17091b
17092:more2
17093s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17094p
17095g
17096s/.\{148\}//
17097t delim
17098' <conf$$subs.awk | sed '
17099/^[^""]/{
17100 N
17101 s/\n//
17102}
17103' >>$CONFIG_STATUS || ac_write_fail=1
17104rm -f conf$$subs.awk
17105cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17106_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017107cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017108 for (key in S) S_is_set[key] = 1
17109 FS = ""
17110
17111}
17112{
17113 line = $ 0
17114 nfields = split(line, field, "@")
17115 substed = 0
17116 len = length(field[1])
17117 for (i = 2; i < nfields; i++) {
17118 key = field[i]
17119 keylen = length(key)
17120 if (S_is_set[key]) {
17121 value = S[key]
17122 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17123 len += length(value) + length(field[++i])
17124 substed = 1
17125 } else
17126 len += 1 + keylen
17127 }
17128
17129 print line
17130}
17131
17132_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017134cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17135if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17136 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17137else
17138 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017139fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017140 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017141_ACEOF
17142
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017143# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17144# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145# trailing colons and then remove the whole line if VPATH becomes empty
17146# (actually we leave an empty line to preserve line numbers).
17147if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017148 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17149h
17150s///
17151s/^/:/
17152s/[ ]*$/:/
17153s/:\$(srcdir):/:/g
17154s/:\${srcdir}:/:/g
17155s/:@srcdir@:/:/g
17156s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017158x
17159s/\(=[ ]*\).*/\1/
17160G
17161s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162s/^[^=]*=[ ]*$//
17163}'
17164fi
17165
Matthias Kloseb9621712010-04-24 17:59:49 +000017166cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017167fi # test -n "$CONFIG_FILES"
17168
Matthias Kloseb9621712010-04-24 17:59:49 +000017169# Set up the scripts for CONFIG_HEADERS section.
17170# No need to generate them if there are no CONFIG_HEADERS.
17171# This happens for instance with `./config.status Makefile'.
17172if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017173cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017174BEGIN {
17175_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176
Matthias Kloseb9621712010-04-24 17:59:49 +000017177# Transform confdefs.h into an awk script `defines.awk', embedded as
17178# here-document in config.status, that substitutes the proper values into
17179# config.h.in to produce config.h.
17180
17181# Create a delimiter string that does not exist in confdefs.h, to ease
17182# handling of long lines.
17183ac_delim='%!_!# '
17184for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017185 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17186 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017187 break
17188 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017189 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017190 else
17191 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17192 fi
17193done
17194
17195# For the awk script, D is an array of macro values keyed by name,
17196# likewise P contains macro parameters if any. Preserve backslash
17197# newline sequences.
17198
17199ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17200sed -n '
17201s/.\{148\}/&'"$ac_delim"'/g
17202t rset
17203:rset
17204s/^[ ]*#[ ]*define[ ][ ]*/ /
17205t def
17206d
17207:def
17208s/\\$//
17209t bsnl
17210s/["\\]/\\&/g
17211s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17212D["\1"]=" \3"/p
17213s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17214d
17215:bsnl
17216s/["\\]/\\&/g
17217s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17218D["\1"]=" \3\\\\\\n"\\/p
17219t cont
17220s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17221t cont
17222d
17223:cont
17224n
17225s/.\{148\}/&'"$ac_delim"'/g
17226t clear
17227:clear
17228s/\\$//
17229t bsnlc
17230s/["\\]/\\&/g; s/^/"/; s/$/"/p
17231d
17232:bsnlc
17233s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17234b cont
17235' <confdefs.h | sed '
17236s/'"$ac_delim"'/"\\\
17237"/g' >>$CONFIG_STATUS || ac_write_fail=1
17238
17239cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17240 for (key in D) D_is_set[key] = 1
17241 FS = ""
17242}
17243/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17244 line = \$ 0
17245 split(line, arg, " ")
17246 if (arg[1] == "#") {
17247 defundef = arg[2]
17248 mac1 = arg[3]
17249 } else {
17250 defundef = substr(arg[1], 2)
17251 mac1 = arg[2]
17252 }
17253 split(mac1, mac2, "(") #)
17254 macro = mac2[1]
17255 prefix = substr(line, 1, index(line, defundef) - 1)
17256 if (D_is_set[macro]) {
17257 # Preserve the white space surrounding the "#".
17258 print prefix "define", macro P[macro] D[macro]
17259 next
17260 } else {
17261 # Replace #undef with comments. This is necessary, for example,
17262 # in the case of _POSIX_SOURCE, which is predefined and required
17263 # on some systems where configure will not decide to define it.
17264 if (defundef == "undef") {
17265 print "/*", prefix defundef, macro, "*/"
17266 next
17267 }
17268 }
17269}
17270{ print }
17271_ACAWK
17272_ACEOF
17273cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017274 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017275fi # test -n "$CONFIG_HEADERS"
17276
17277
17278eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17279shift
17280for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281do
17282 case $ac_tag in
17283 :[FHLC]) ac_mode=$ac_tag; continue;;
17284 esac
17285 case $ac_mode$ac_tag in
17286 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017287 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288 :[FH]-) ac_tag=-:-;;
17289 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17290 esac
17291 ac_save_IFS=$IFS
17292 IFS=:
17293 set x $ac_tag
17294 IFS=$ac_save_IFS
17295 shift
17296 ac_file=$1
17297 shift
17298
17299 case $ac_mode in
17300 :L) ac_source=$1;;
17301 :[FH])
17302 ac_file_inputs=
17303 for ac_f
17304 do
17305 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017306 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 *) # Look for the file first in the build tree, then in the source tree
17308 # (if the path is not absolute). The absolute path cannot be DOS-style,
17309 # because $ac_f cannot contain `:'.
17310 test -f "$ac_f" ||
17311 case $ac_f in
17312 [\\/$]*) false;;
17313 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17314 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017315 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017316 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017317 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17318 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319 done
17320
17321 # Let's still pretend it is `configure' which instantiates (i.e., don't
17322 # use $as_me), people would be surprised to read:
17323 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017324 configure_input='Generated from '`
17325 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17326 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 if test x"$ac_file" != x-; then
17328 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017329 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17330$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017332 # Neutralize special characters interpreted by sed in replacement strings.
17333 case $configure_input in #(
17334 *\&* | *\|* | *\\* )
17335 ac_sed_conf_input=`$as_echo "$configure_input" |
17336 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17337 *) ac_sed_conf_input=$configure_input;;
17338 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339
17340 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017341 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17342 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343 esac
17344 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 esac
17346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017348$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017349 X"$ac_file" : 'X\(//\)[^/]' \| \
17350 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017352$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17354 s//\1/
17355 q
17356 }
17357 /^X\(\/\/\)[^/].*/{
17358 s//\1/
17359 q
17360 }
17361 /^X\(\/\/\)$/{
17362 s//\1/
17363 q
17364 }
17365 /^X\(\/\).*/{
17366 s//\1/
17367 q
17368 }
17369 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017370 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017371 ac_builddir=.
17372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373case "$ac_dir" in
17374.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17375*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017376 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017378 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379 case $ac_top_builddir_sub in
17380 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17381 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17382 esac ;;
17383esac
17384ac_abs_top_builddir=$ac_pwd
17385ac_abs_builddir=$ac_pwd$ac_dir_suffix
17386# for backward compatibility:
17387ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017388
17389case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017391 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392 ac_top_srcdir=$ac_top_builddir_sub
17393 ac_abs_top_srcdir=$ac_pwd ;;
17394 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017395 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396 ac_top_srcdir=$srcdir
17397 ac_abs_top_srcdir=$srcdir ;;
17398 *) # Relative name.
17399 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17400 ac_top_srcdir=$ac_top_build_prefix$srcdir
17401 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017402esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017404
Martin v. Löwis11437992002-04-12 09:54:03 +000017405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406 case $ac_mode in
17407 :F)
17408 #
17409 # CONFIG_FILE
17410 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017411
17412 case $INSTALL in
17413 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017415 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017416 ac_MKDIR_P=$MKDIR_P
17417 case $MKDIR_P in
17418 [\\/$]* | ?:[\\/]* ) ;;
17419 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17420 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017421_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017422
Matthias Kloseb9621712010-04-24 17:59:49 +000017423cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424# If the template does not know about datarootdir, expand it.
17425# FIXME: This hack should be removed a few years after 2.60.
17426ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017427ac_sed_dataroot='
17428/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 p
17430 q
17431}
17432/@datadir@/p
17433/@docdir@/p
17434/@infodir@/p
17435/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017436/@mandir@/p'
17437case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438*datarootdir*) ac_datarootdir_seen=yes;;
17439*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017440 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17441$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017443cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444 ac_datarootdir_hack='
17445 s&@datadir@&$datadir&g
17446 s&@docdir@&$docdir&g
17447 s&@infodir@&$infodir&g
17448 s&@localedir@&$localedir&g
17449 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017450 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451esac
17452_ACEOF
17453
17454# Neutralize VPATH when `$srcdir' = `.'.
17455# Shell code in configure.ac might set extrasub.
17456# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017457cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17458ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017459$extrasub
17460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017462:t
17463/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017464s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017466s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467s&@srcdir@&$ac_srcdir&;t t
17468s&@abs_srcdir@&$ac_abs_srcdir&;t t
17469s&@top_srcdir@&$ac_top_srcdir&;t t
17470s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17471s&@builddir@&$ac_builddir&;t t
17472s&@abs_builddir@&$ac_abs_builddir&;t t
17473s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17474s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017475s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017477"
Victor Stinnere0be4232011-10-25 13:06:09 +020017478eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17479 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017481test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017482 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17483 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17484 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017486which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017487$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017488which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017489
Victor Stinnere0be4232011-10-25 13:06:09 +020017490 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017492 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17493 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017494 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017495 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496 ;;
17497 :H)
17498 #
17499 # CONFIG_HEADER
17500 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017502 {
17503 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017504 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17505 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017506 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017507 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017508 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17509$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017510 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017512 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017513 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017514 fi
17515 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017516 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017517 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017518 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017519 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522
17523 esac
17524
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017525
17526 case $ac_file$ac_mode in
17527 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17528
17529 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530done # for ac_tag
17531
Guido van Rossum627b2d71993-12-24 10:39:16 +000017532
Matthias Kloseb9621712010-04-24 17:59:49 +000017533as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017534_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017535ac_clean_files=$ac_clean_files_save
17536
Matthias Kloseb9621712010-04-24 17:59:49 +000017537test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017538 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017539
Martin v. Löwis11437992002-04-12 09:54:03 +000017540
17541# configure is writing to config.log, and then calls config.status.
17542# config.status does its own redirection, appending to config.log.
17543# Unfortunately, on DOS this fails, as config.log is still kept open
17544# by configure, so config.status won't be able to write to it; its
17545# output is simply discarded. So we exec the FD to /dev/null,
17546# effectively closing config.log, so it can be properly (re)opened and
17547# appended to by config.status. When coming back to configure, we
17548# need to make the FD available again.
17549if test "$no_create" != yes; then
17550 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017551 ac_config_status_args=
17552 test "$silent" = yes &&
17553 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017555 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 exec 5>>config.log
17557 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17558 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017559 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017560fi
17561if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17563$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017564fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017565
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017566
Christian Heimes75ed8902013-11-20 01:11:18 +010017567echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017568if test ! -f Modules/Setup
17569then
17570 cp $srcdir/Modules/Setup.dist Modules/Setup
17571fi
17572
Christian Heimes75ed8902013-11-20 01:11:18 +010017573echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017574if test ! -f Modules/Setup.local
17575then
17576 echo "# Edit this file for local setup changes" >Modules/Setup.local
17577fi
17578
Christian Heimes75ed8902013-11-20 01:11:18 +010017579echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017580$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17581 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017582 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017583mv config.c Modules